Break utils package into subpackages.
This commit is contained in:
parent
06ecd73f67
commit
d7a5adb239
25 changed files with 276 additions and 318 deletions
12
internal/utils/strslice/strslice.go
Normal file
12
internal/utils/strslice/strslice.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package strslice
|
||||
|
||||
// Contains checks if slice of strings contains a string
|
||||
func Contains(strings []string, contains string) bool {
|
||||
for _, str := range strings {
|
||||
if str == contains {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue