mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
Add support for get/set/rm of exchange pairs via gRPC
This commit is contained in:
@@ -56,13 +56,13 @@ func (a Items) Strings() []string {
|
||||
|
||||
// Contains returns whether or not the supplied asset exists
|
||||
// in the list of Items
|
||||
func (a Items) Contains(asset Item) bool {
|
||||
if !IsValid(asset) {
|
||||
func (a Items) Contains(i Item) bool {
|
||||
if !IsValid(i) {
|
||||
return false
|
||||
}
|
||||
|
||||
for x := range a {
|
||||
if a[x] == asset {
|
||||
if strings.EqualFold(a[x].String(), i.String()) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ func TestContains(t *testing.T) {
|
||||
if a.Contains(Binary) {
|
||||
t.Fatal("Test failed - TestContains returned an unexpected result")
|
||||
}
|
||||
|
||||
if !a.Contains("SpOt") {
|
||||
t.Error("Test failed - TestContains returned an unexpected result")
|
||||
}
|
||||
}
|
||||
|
||||
func TestJoinToString(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user