lbry.go/util/slice.go
Niko Storni 659a20a5ba
fix selfsync issues with the queue
remove margin for fees
handle non latin names
adjusted error handling
2018-07-12 08:26:45 -04:00

21 lines
325 B
Go

package util
import "strings"
func InSlice(str string, values []string) bool {
for _, v := range values {
if str == v {
return true
}
}
return false
}
func InSliceContains(subStr string, values []string) bool {
for _, v := range values {
if strings.Contains(v, subStr) {
return true
}
}
return false
}