mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 15:11:10 +00:00
qa/spelling: Add Codespell support (#1121)
* Add codespell support * Fix paths * Add HTML files to exclusion list
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/request"
|
||||
)
|
||||
|
||||
// Coinmarketcap account plan bitmasks, url and enpoint consts
|
||||
// Coinmarketcap account plan bitmasks, url and endpoint consts
|
||||
const (
|
||||
Basic uint8 = 1 << iota
|
||||
Hobbyist
|
||||
|
||||
@@ -58,15 +58,15 @@ func TestGetLatestRates(t *testing.T) {
|
||||
}
|
||||
|
||||
if result.Base != "EUR" {
|
||||
t.Fatalf("unexepcted result. Base currency should be EUR")
|
||||
t.Fatalf("unexpected result. Base currency should be EUR")
|
||||
}
|
||||
|
||||
if result.Rates["EUR"] != 1 {
|
||||
t.Fatalf("unexepcted result. EUR value should be 1")
|
||||
t.Fatalf("unexpected result. EUR value should be 1")
|
||||
}
|
||||
|
||||
if len(result.Rates) <= 1 {
|
||||
t.Fatalf("unexepcted result. Rates map should be 1")
|
||||
t.Fatalf("unexpected result. Rates map should be 1")
|
||||
}
|
||||
|
||||
if e.APIKeyLvl <= apiKeyFree {
|
||||
@@ -82,11 +82,11 @@ func TestGetLatestRates(t *testing.T) {
|
||||
}
|
||||
|
||||
if result.Base != "EUR" {
|
||||
t.Fatalf("unexepcted result. Base currency should be EUR")
|
||||
t.Fatalf("unexpected result. Base currency should be EUR")
|
||||
}
|
||||
|
||||
if len(result.Rates) != 1 {
|
||||
t.Fatalf("unexepcted result. Rates len should be 1")
|
||||
t.Fatalf("unexpected result. Rates len should be 1")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,12 +81,12 @@ func TestGet(t *testing.T) {
|
||||
|
||||
_, err = p.Get(asset.Empty)
|
||||
if !errors.Is(err, asset.ErrNotSupported) {
|
||||
t.Fatalf("received: '%v' bu expected: '%v'", err, asset.ErrNotSupported)
|
||||
t.Fatalf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported)
|
||||
}
|
||||
|
||||
_, err = p.Get(asset.CoinMarginedFutures)
|
||||
if !errors.Is(err, asset.ErrNotSupported) {
|
||||
t.Fatalf("received: '%v' bu expected: '%v'", err, asset.ErrNotSupported)
|
||||
t.Fatalf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,12 +132,12 @@ func TestStore(t *testing.T) {
|
||||
|
||||
err = p.Store(asset.Empty, nil)
|
||||
if !errors.Is(err, asset.ErrNotSupported) {
|
||||
t.Fatalf("received: '%v' bu expected: '%v'", err, asset.ErrNotSupported)
|
||||
t.Fatalf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported)
|
||||
}
|
||||
|
||||
err = p.Store(asset.Futures, nil)
|
||||
if !errors.Is(err, errPairStoreIsNil) {
|
||||
t.Fatalf("received: '%v' bu expected: '%v'", err, errPairStoreIsNil)
|
||||
t.Fatalf("received: '%v' but expected: '%v'", err, errPairStoreIsNil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ func TestGetPairs(t *testing.T) {
|
||||
|
||||
pairs, err = p.GetPairs(asset.Empty, true)
|
||||
if !errors.Is(err, asset.ErrNotSupported) {
|
||||
t.Fatalf("received: '%v' but expetced: '%v'", err, asset.ErrNotSupported)
|
||||
t.Fatalf("received: '%v' but expected: '%v'", err, asset.ErrNotSupported)
|
||||
}
|
||||
|
||||
if pairs != nil {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
var errCannotCreatePair = errors.New("cannot create currency pair")
|
||||
|
||||
// NewPairDelimiter splits the desired currency string at delimeter, the returns
|
||||
// NewPairDelimiter splits the desired currency string at delimiter, the returns
|
||||
// a Pair struct
|
||||
func NewPairDelimiter(currencyPair, delimiter string) (Pair, error) {
|
||||
if !strings.Contains(currencyPair, delimiter) {
|
||||
@@ -82,7 +82,7 @@ func NewPairFromIndex(currencyPair, index string) (Pair, error) {
|
||||
}
|
||||
|
||||
// NewPairFromString converts currency string into a new CurrencyPair
|
||||
// with or without delimeter
|
||||
// with or without delimiter
|
||||
func NewPairFromString(currencyPair string) (Pair, error) {
|
||||
for x := range delimiters {
|
||||
if strings.Contains(currencyPair, delimiters[x]) {
|
||||
|
||||
Reference in New Issue
Block a user