Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2015 18:21
Show Gist options
  • Save anonymous/028e3638555a090ccd18 to your computer and use it in GitHub Desktop.
Save anonymous/028e3638555a090ccd18 to your computer and use it in GitHub Desktop.
inArray function equive in Go lang
// Function to check if the the string given is in the array
inArray := func(str string, list []string) bool {
for _, v := range list {
if v == str {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment