mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
golangci-lint/CI: Bump versions and introduce new linters (#798)
* golangci-lint/CI: Bump versions
Fix remaining linter issues
* Specifically set AppVeyor version
* Fix the infamous typos 👀
* Add go env cmd to AppVeyor
* Add go version cmd to AppVeyor
* Specify AppVeyor image, adjust linters
* Update go get to go install due to deprecation
* Bump golangci-lint timeout time for AppVeyor
* Change NW contract to NQ
* Address nitters
* GetRandomPair -> Pair{}
* Address nits
* Address time nitterinos plus additional tweaks
* More time inception upgrades!
* Bending time and space
This commit is contained in:
@@ -30,17 +30,17 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
|
||||
|
||||
[SQLBoiler](https://github.com/thrasher-corp/sqlboiler)
|
||||
```shell script
|
||||
go get -u github.com/thrasher-corp/sqlboiler
|
||||
go install github.com/thrasher-corp/sqlboiler
|
||||
```
|
||||
|
||||
[Postgres Driver](https://github.com/thrasher-corp/sqlboiler/drivers/sqlboiler-psql)
|
||||
```shell script
|
||||
go get -u github.com/thrasher-corp/sqlboiler/drivers/sqlboiler-psql
|
||||
go install github.com/thrasher-corp/sqlboiler/drivers/sqlboiler-psql
|
||||
```
|
||||
|
||||
[SQLite Driver](https://github.com/thrasher-corp/sqlboiler-sqlite3)
|
||||
```shell script
|
||||
go get -u github.com/thrasher-corp/sqlboiler-sqlite3
|
||||
go install github.com/thrasher-corp/sqlboiler-sqlite3
|
||||
```
|
||||
|
||||
##### Configuration
|
||||
|
||||
@@ -241,25 +241,19 @@ func TestSeries(t *testing.T) {
|
||||
t.Errorf("unexpected number of results received: %v", len(ret.Candles))
|
||||
}
|
||||
|
||||
ret, err = Series("", "", "", 0, "", start, end)
|
||||
_, err = Series("", "", "", 0, "", start, end)
|
||||
if !errors.Is(err, errInvalidInput) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ret, err = Series(testExchanges[0].Name,
|
||||
_, err = Series(testExchanges[0].Name,
|
||||
"BTC", "MOON",
|
||||
864000, "spot",
|
||||
start, end)
|
||||
if err != nil {
|
||||
if !errors.Is(err, errInvalidInput) {
|
||||
if !errors.Is(err, ErrNoCandleDataFound) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
if err != nil && !errors.Is(err, errInvalidInput) && !errors.Is(err, ErrNoCandleDataFound) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = testhelpers.CloseDatabase(dbConn)
|
||||
if err != nil {
|
||||
if err = testhelpers.CloseDatabase(dbConn); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -177,8 +177,7 @@ func seed() error {
|
||||
|
||||
func TestLoadCSV(t *testing.T) {
|
||||
testData := filepath.Join("..", "..", "..", "testdata", "exchangelist.csv")
|
||||
_, err := LoadCSV(testData)
|
||||
if err != nil {
|
||||
if _, err := LoadCSV(testData); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ func TestTrades(t *testing.T) {
|
||||
}
|
||||
|
||||
func tradeSQLTester(t *testing.T) {
|
||||
t.Helper()
|
||||
var trades, trades2 []Data
|
||||
firstTime := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
for i := 0; i < 20; i++ {
|
||||
|
||||
@@ -151,6 +151,7 @@ func seedWithdrawData() {
|
||||
}
|
||||
}
|
||||
func withdrawHelper(t *testing.T) {
|
||||
t.Helper()
|
||||
seedWithdrawData()
|
||||
|
||||
_, err := GetEventByUUID(withdraw.DryRunID.String())
|
||||
|
||||
Reference in New Issue
Block a user