github.com/lmb/consul@v1.4.1/lib/string.go (about)

     1  package lib
     2  
     3  // StrContains checks if a list contains a string
     4  func StrContains(l []string, s string) bool {
     5  	for _, v := range l {
     6  		if v == s {
     7  			return true
     8  		}
     9  	}
    10  	return false
    11  }