Skip to content

Commit

Permalink
* Follow golang project structures convention
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-yakop committed Dec 29, 2020
1 parent 6c87c06 commit 1f1ab33
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 22 deletions.
12 changes: 6 additions & 6 deletions app/dukapp.go → internal/app/dukapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"sync"
"time"

"ed-fx/go-duka/bi5"
"ed-fx/go-duka/core"
"ed-fx/go-duka/csv"
"ed-fx/go-duka/fxt4"
"ed-fx/go-duka/hst"
"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/bi5"
"ed-fx/go-duka/internal/core"
"ed-fx/go-duka/internal/export/csv"
"ed-fx/go-duka/internal/export/fxt4"
"ed-fx/go-duka/internal/export/hst"
"ed-fx/go-duka/internal/misc"
)

var (
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions bi5/bi5.go → internal/bi5/bi5.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"path/filepath"
"time"

"ed-fx/go-duka/core"
"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/core"
"ed-fx/go-duka/internal/misc"
//"github.com/kjk/lzma"
"github.com/ulikunitz/xz/lzma"
)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion core/fetch.go → internal/core/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/misc"
)

const (
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion core/tickdata.go → internal/core/tickdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ type TickData struct {

// UTC convert timestamp to UTC time
//
const timeMillisecond int64 = int64(time.Millisecond)

func (t *TickData) UTC() time.Time {
tm := time.Unix(t.Timestamp/1000, (t.Timestamp%1000)*int64(time.Millisecond))
tm := time.Unix(t.Timestamp/1000, (t.Timestamp%1000)*timeMillisecond)
return tm.UTC()
}

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions csv/csv.go → internal/export/csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"time"

"ed-fx/go-duka/core"
"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/core"
"ed-fx/go-duka/internal/misc"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion csv/csv_test.go → internal/export/csv/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"ed-fx/go-duka/bi5"
"ed-fx/go-duka/internal/bi5"
)

func TestCloseChan(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions fxt4/fxt4.go → internal/export/fxt4/fxt4.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package fxt4
import (
"bufio"
"bytes"
"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/misc"
"encoding/binary"
"fmt"
"io"
"math"
"os"
"path/filepath"

"ed-fx/go-duka/core"
"ed-fx/go-duka/internal/core"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion fxt4/fxt4_test.go → internal/export/fxt4/fxt4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"testing"

"ed-fx/go-duka/core"
"ed-fx/go-duka/internal/core"
)

func TestFxtFile(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion fxt4/header.go → internal/export/fxt4/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/misc"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion hst/header.go → internal/export/hst/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/misc"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions hst/hst401.go → internal/export/hst/hst401.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"path/filepath"

"ed-fx/go-duka/core"
"ed-fx/go-duka/misc"
"ed-fx/go-duka/internal/core"
"ed-fx/go-duka/internal/misc"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package main

import (
"ed-fx/go-duka/app"
"ed-fx/go-duka/internal/app"
"flag"
"fmt"
"path/filepath"
"time"

"ed-fx/go-duka/fxt4"
"ed-fx/go-duka/internal/export/fxt4"
"unknwon.dev/clog/v2"
)

Expand Down

0 comments on commit 1f1ab33

Please sign in to comment.