Bump golangci-lint, Docker and Go CI versions (#564)

* Bump golangci-lint and Go CI versions

* Bump golangci-lint version

* Address nitterinos
This commit is contained in:
Adrian Gallagher
2020-09-24 09:52:37 +10:00
committed by GitHub
parent 991dfed705
commit d9bcf8246f
24 changed files with 96 additions and 70 deletions

View File

@@ -116,21 +116,25 @@ func (c *Coinmarketcap) GetCryptocurrencyHistoricalListings() ([]CryptocurrencyH
// Status Status `json:"status"`
// }{}
// nolint: gocritic err := c.CheckAccountPlan(0)
// nolint:gocritic // unused code, used as example
// err := c.CheckAccountPlan(0)
// if err != nil {
// return resp.Data, err
// }
// nolint: gocritic err = c.SendHTTPRequest(http.MethodGet, endpointCryptocurrencyHistoricalListings, nil, &resp)
// nolint:gocritic // unused code, used as example
// err = c.SendHTTPRequest(http.MethodGet, endpointCryptocurrencyHistoricalListings, nil, &resp)
// if err != nil {
// return resp.Data, err
// }
// nolint: gocritic nolint:gocritic if resp.Status.ErrorCode != 0 {
// nolint:gocritic // unused code, used as example
// if resp.Status.ErrorCode != 0 {
// return resp.Data, errors.New(resp.Status.ErrorMessage)
// }
// nolint: gocritic nolint:gocritic return resp.Data, nil
// nolint:gocritic // unused code, used as example
// return resp.Data, nil
}
// GetCryptocurrencyLatestListing returns a paginated list of all

View File

@@ -191,5 +191,5 @@ func (p Pairs) GetRandomPair() Pair {
return Pair{Base: NewCode(""), Quote: NewCode("")}
}
return p[rand.Intn(pairsLen)]
return p[rand.Intn(pairsLen)] // nolint:gosec // basic number generation required, no need for crypo/rand
}