File: strings.go

package info (click to toggle)
golang-github-pseudomuto-protokit 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: makefile: 61
file content (12 lines) | stat: -rw-r--r-- 220 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
package utils

// InStringSlice returns whether or not the supplied value is in the slice
func InStringSlice(sl []string, val string) bool {
	for _, s := range sl {
		if s == val {
			return true
		}
	}

	return false
}