Skip to content

Instantly share code, notes, and snippets.

@techjanitor
Created January 1, 2015 22:26
Show Gist options
  • Save techjanitor/604bb6e4cae5b9facfed to your computer and use it in GitHub Desktop.
Save techjanitor/604bb6e4cae5b9facfed to your computer and use it in GitHub Desktop.
Case insensitive string comparison
func contains(s []string, e string) bool {
for _, a := range s {
if strings.EqualFold(a, e) {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment