Skip to content

Instantly share code, notes, and snippets.

@mottet-dev
Last active July 8, 2019 20:10
Embed
What would you like to do?
Go Test - SliceIncludesInt
package helpers
func DoesSliceIncludesInt(value int, slice []int) bool {
for _, i := range slice {
if value == i {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment