mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 07:26:45 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user