Passed
Push — main ( a82edc...08e96c )
by Igor
58s queued 11s
created

is/strings.go   A

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A is.StringInList 0 8 3
1
package is
2
3
// StringInList returns true if one of the elements of the list is equal to the string.
4
func StringInList(s string, list []string) bool {
5
	for _, ls := range list {
6
		if ls == s {
7
			return true
8
		}
9
	}
10
11
	return false
12
}
13