mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
1) Although gRPC does server side validation currently, validate basic things on gctcli before relaying the request to the gRPC server 2) Make pair format consistent for the exchange sycner 3) Fix OKEX ticker failure due to thinking futures info is authenticated 4) Start filling out config tests 5) Extend timeout for golangci config so that AppVeyor has time to complete (Travis is fine) 6) Add IsSupported exchange func for easy lookup
22 lines
408 B
Go
22 lines
408 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"strings"
|
|
|
|
exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
|
|
)
|
|
|
|
var (
|
|
errInvalidPair = errors.New("invalid currency pair supplied")
|
|
errInvalidExchange = errors.New("invalid exchange supplied")
|
|
)
|
|
|
|
func validPair(pair string) bool {
|
|
return strings.Contains(pair, pairDelimiter)
|
|
}
|
|
|
|
func validExchange(exch string) bool {
|
|
return exchange.IsSupported(exch)
|
|
}
|