slices.go | |
---|---|
|
|
Package collections contains helper functions to work with collections. |
|
Documentation in literate-programming-style is available at: https://redhatinsights.github.io/insights-operator-utils/packages/collections/slices.html |
|
StringInSlice tests whether the given string is contained in slice of strings. If the slice is empty, false is returned. |
|
Index finds given key in sequence. Second return value indicates if key was found or not. If the sequence is empty, zero index is returned with found flag set to false. |
|
any index is ok to return |
|