mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 23:16:53 +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:
@@ -305,7 +305,10 @@ func TestConnectionMessageErrors(t *testing.T) {
|
||||
ws.ReadMessageErrors <- errors.New("errorText")
|
||||
select {
|
||||
case err := <-ws.ToRoutine:
|
||||
if err.(error).Error() != "errorText" {
|
||||
errText, ok := err.(error)
|
||||
if !ok {
|
||||
t.Error("unable to type assert error")
|
||||
} else if errText.Error() != "errorText" {
|
||||
t.Errorf("Expected 'errorText', received %v", err)
|
||||
}
|
||||
case <-timer.C:
|
||||
@@ -1045,12 +1048,12 @@ type GenSubs struct {
|
||||
|
||||
// generateSubs default subs created from the enabled pairs list
|
||||
func (g *GenSubs) generateSubs() ([]ChannelSubscription, error) {
|
||||
var superduperchannelsubs []ChannelSubscription
|
||||
superduperchannelsubs := make([]ChannelSubscription, len(g.EnabledPairs))
|
||||
for i := range g.EnabledPairs {
|
||||
superduperchannelsubs = append(superduperchannelsubs, ChannelSubscription{
|
||||
superduperchannelsubs[i] = ChannelSubscription{
|
||||
Channel: "TEST:" + strconv.FormatInt(int64(i), 10),
|
||||
Currency: g.EnabledPairs[i],
|
||||
})
|
||||
}
|
||||
}
|
||||
return superduperchannelsubs, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user