github.com/kjdelisle/consul@v1.4.5/lib/string_test.go (about) 1 package lib 2 3 import ( 4 "testing" 5 ) 6 7 func TestStrContains(t *testing.T) { 8 l := []string{"a", "b", "c"} 9 if !StrContains(l, "b") { 10 t.Fatalf("should contain") 11 } 12 if StrContains(l, "d") { 13 t.Fatalf("should not contain") 14 } 15 }