Browse Source

Cull unused function and its unit test.

Pointed out by: @slackpad
pull/1666/head
Sean Chittenden 9 years ago
parent
commit
6c1bb78d06
  1. 8
      lib/string.go
  2. 9
      lib/string_test.go

8
lib/string.go

@ -13,11 +13,3 @@ func StrContains(l []string, s string) bool {
}
return false
}
func ToLowerList(l []string) []string {
var out []string
for _, value := range l {
out = append(out, strings.ToLower(value))
}
return out
}

9
lib/string_test.go

@ -13,12 +13,3 @@ func TestStrContains(t *testing.T) {
t.Fatalf("should not contain")
}
}
func TestToLowerList(t *testing.T) {
l := []string{"ABC", "Abc", "abc"}
for _, value := range ToLowerList(l) {
if value != "abc" {
t.Fatalf("failed lowercasing")
}
}
}

Loading…
Cancel
Save