Skip to content

Commit e8d72ee

Browse files
committed
Fix imports.
1 parent ca27b8f commit e8d72ee

26 files changed

+98
-37
lines changed

Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
format:
2+
go mod verify
3+
go build -v ./...
4+
go vet ./...
5+
staticcheck ./...
6+
golint ./...
7+
8+
test: ## Run tests
9+
test:
10+
go test -race -vet=off ./...
11+
12+
push: test format
13+
@git push
14+
15+
help: ## prints this help
16+
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
17+
18+
.DEFAULT_GOAL := help
19+
20+
.PHONY: format test help push

candles/binance/api_klines.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import (
1010
"strings"
1111
"time"
1212

13+
"github.com/marianogappa/crypto-candles/candles/common"
1314
"github.com/rs/zerolog/log"
14-
15-
"github.com/marianogappa/crypto-candles/common"
1615
)
1716

1817
type errorResponse struct {

candles/binance/api_klines_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/marianogappa/crypto-candles/common"
11+
"github.com/marianogappa/crypto-candles/candles/common"
1212
)
1313

1414
func TestHappyToCandlesticks(t *testing.T) {

candles/binance/binance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// Binance struct enables requesting candlesticks from Binance

candles/binanceusdmfutures/api_klines.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import (
1010
"strings"
1111
"time"
1212

13+
"github.com/marianogappa/crypto-candles/candles/common"
1314
"github.com/rs/zerolog/log"
14-
15-
"github.com/marianogappa/crypto-candles/common"
1615
)
1716

1817
type errorResponse struct {

candles/binanceusdmfutures/api_klines_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/marianogappa/crypto-candles/common"
11+
"github.com/marianogappa/crypto-candles/candles/common"
1212
)
1313

1414
func TestHappyToCandlesticks(t *testing.T) {

candles/binanceusdmfutures/binance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// BinanceUSDMFutures struct enables requesting candlesticks from BinanceUSDMFutures

candles/bitstamp/api_klines.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"strings"
1111
"time"
1212

13-
"github.com/marianogappa/crypto-candles/common"
13+
"github.com/marianogappa/crypto-candles/candles/common"
1414
"github.com/rs/zerolog/log"
1515
)
1616

candles/bitstamp/api_klines_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/marianogappa/crypto-candles/common"
11+
"github.com/marianogappa/crypto-candles/candles/common"
1212
"github.com/stretchr/testify/require"
1313
)
1414

candles/bitstamp/bitstamp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// Bitstamp struct enables requesting candlesticks from Bitstamp

candles/cache/cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"time"
3939

4040
lru "github.com/hashicorp/golang-lru"
41-
"github.com/marianogappa/crypto-candles/common"
41+
"github.com/marianogappa/crypto-candles/candles/common"
4242
)
4343

4444
// MemoryCache implements the in-memory LRU cache layer that this package exposes.

candles/cache/cache_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/marianogappa/predictions/candles/common"
8+
"github.com/marianogappa/crypto-candles/candles/common"
99
"github.com/stretchr/testify/require"
1010
)
1111

candles/cache/internal.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
func (c *MemoryCache) put(metric Metric, candlesticks []common.Candlestick) error {

candles/candles.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import (
55
"strings"
66
"time"
77

8-
"github.com/marianogappa/crypto-candles/binance"
9-
"github.com/marianogappa/crypto-candles/binanceusdmfutures"
10-
"github.com/marianogappa/crypto-candles/bitstamp"
11-
"github.com/marianogappa/crypto-candles/cache"
12-
"github.com/marianogappa/crypto-candles/coinbase"
13-
"github.com/marianogappa/crypto-candles/common"
14-
"github.com/marianogappa/crypto-candles/ftx"
15-
"github.com/marianogappa/crypto-candles/iterator"
16-
"github.com/marianogappa/crypto-candles/kucoin"
8+
"github.com/marianogappa/crypto-candles/candles/binance"
9+
"github.com/marianogappa/crypto-candles/candles/binanceusdmfutures"
10+
"github.com/marianogappa/crypto-candles/candles/bitstamp"
11+
"github.com/marianogappa/crypto-candles/candles/cache"
12+
"github.com/marianogappa/crypto-candles/candles/coinbase"
13+
"github.com/marianogappa/crypto-candles/candles/common"
14+
"github.com/marianogappa/crypto-candles/candles/ftx"
15+
"github.com/marianogappa/crypto-candles/candles/iterator"
16+
"github.com/marianogappa/crypto-candles/candles/kucoin"
1717
)
1818

1919
// IMarket only exists so that tests can use a test iterator.

candles/coinbase/api_klines.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import (
99
"strings"
1010
"time"
1111

12+
"github.com/marianogappa/crypto-candles/candles/common"
1213
"github.com/rs/zerolog/log"
13-
14-
"github.com/marianogappa/crypto-candles/common"
1514
)
1615

1716
type successResponse = [][]interface{}

candles/coinbase/api_klines_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/marianogappa/predictions/candles/common"
11+
"github.com/marianogappa/crypto-candles/candles/common"
1212
)
1313

1414
func TestHappyToCandlesticks(t *testing.T) {

candles/coinbase/coinbase.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// Coinbase struct enables requesting candlesticks from Coinbase

candles/ftx/api_klines.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import (
88
"strings"
99
"time"
1010

11+
"github.com/marianogappa/crypto-candles/candles/common"
1112
"github.com/rs/zerolog/log"
12-
13-
"github.com/marianogappa/crypto-candles/common"
1413
)
1514

1615
//[

candles/ftx/ftx.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// FTX struct enables requesting candlesticks from FTX

candles/iterator/iterator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/cache"
8-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/cache"
8+
"github.com/marianogappa/crypto-candles/candles/common"
99
"github.com/rs/zerolog/log"
1010
)
1111

candles/iterator/iterator_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/marianogappa/crypto-candles/cache"
9-
"github.com/marianogappa/crypto-candles/common"
8+
"github.com/marianogappa/crypto-candles/candles/cache"
9+
"github.com/marianogappa/crypto-candles/candles/common"
1010
"github.com/stretchr/testify/require"
1111
)
1212

candles/kucoin/api_klines.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/marianogappa/crypto-candles/common"
12+
"github.com/marianogappa/crypto-candles/candles/common"
1313
"github.com/rs/zerolog/log"
1414
)
1515

candles/kucoin/api_klines_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/marianogappa/predictions/candles/common"
11+
"github.com/marianogappa/crypto-candles/candles/common"
1212
)
1313

1414
func TestHappyToCandlesticks(t *testing.T) {

candles/kucoin/kucoin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
"github.com/marianogappa/crypto-candles/common"
7+
"github.com/marianogappa/crypto-candles/candles/common"
88
)
99

1010
// Kucoin struct enables requesting candlesticks from Kucoin

go.mod

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
module github.com/marianogappa/crypto-candles
22

33
go 1.18
4+
5+
require (
6+
github.com/hashicorp/golang-lru v0.5.4
7+
github.com/rs/zerolog v1.27.0
8+
github.com/stretchr/testify v1.8.0
9+
)
10+
11+
require (
12+
github.com/davecgh/go-spew v1.1.1 // indirect
13+
github.com/mattn/go-colorable v0.1.12 // indirect
14+
github.com/mattn/go-isatty v0.0.14 // indirect
15+
github.com/pmezard/go-difflib v1.0.0 // indirect
16+
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
17+
gopkg.in/yaml.v3 v3.0.1 // indirect
18+
)

go.sum

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5+
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
6+
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
7+
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
8+
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
9+
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
10+
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
11+
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
12+
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
13+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
14+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
15+
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
16+
github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs=
17+
github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U=
18+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
19+
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
20+
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
21+
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
22+
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
23+
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
24+
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo=
25+
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
26+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
27+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
28+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
29+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
30+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)