CI: Fix golangci-lint linter issues, add prealloc linter and bump version depends for Go 1.18 (#915)

* Bump CI versions

* Specifically set go version as 1.17.x bumps it to 1.18

* Another

* Adjust AppVeyor

* Part 1 of linter issues

* Part 2

* Fix various linters and improvements

* Part 3

* Finishing touches

* Tests and EqualFold

* Fix nitterinos plus bonus requester jobs bump for exchanges with large number of tests

* Fix nitterinos and bump golangci-lint timeout for AppVeyor

* Address nits, ensure all books are returned on err due to syncer regression

* Fix the wiggins

* Fix duplication

* Fix nitterinos
This commit is contained in:
Adrian Gallagher
2022-04-20 13:45:15 +10:00
committed by GitHub
parent c48e5ea90a
commit 9a4eb9de84
216 changed files with 3493 additions and 2424 deletions

View File

@@ -3,7 +3,7 @@ package main
import (
"errors"
"fmt"
"io/ioutil"
"io"
"math"
"os"
"path/filepath"
@@ -4226,7 +4226,7 @@ func gctScriptUpload(c *cli.Context) error {
defer closeConn(conn, cancel)
client := gctrpc.NewGoCryptoTraderClient(conn)
data, err := ioutil.ReadAll(file)
data, err := io.ReadAll(file)
if err != nil {
return err
}

View File

@@ -198,7 +198,7 @@ func enableDisableExchangePair(c *cli.Context) error {
pairList := strings.Split(pairs, ",")
var validPairs []*gctrpc.CurrencyPair
validPairs := make([]*gctrpc.CurrencyPair, len(pairList))
for i := range pairList {
if !validPair(pairList[i]) {
return errInvalidPair
@@ -209,11 +209,11 @@ func enableDisableExchangePair(c *cli.Context) error {
return err
}
validPairs = append(validPairs, &gctrpc.CurrencyPair{
validPairs[i] = &gctrpc.CurrencyPair{
Delimiter: p.Delimiter,
Base: p.Base.String(),
Quote: p.Quote.String(),
})
}
}
conn, cancel, err := setupClient(c)