Documentation ¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/jeremmfr/go-utils/basiccheck" ) func main() { sliceOfString := []string{"foo", "bar"} if basiccheck.StringInSlice("bar", sliceOfString) { fmt.Printf("bar found in %v", sliceOfString) } else { fmt.Printf("bar not found in %v", sliceOfString) } }
Output: bar found in [foo bar]
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualStringSlice ¶
EqualStringSlice check if two slice of string is Equal: same length, same element in same order.
func Int64InSlice ¶
Int64InSlice check if int64 is present in slice of int64.
func IntInSlice ¶
IntInSlice check if int is present in slice of int.
func StringHasOneOfPrefixes ¶ added in v0.2.0
StringHasOneOfPrefixes check if string has one of prefix list.
func StringInSlice ¶
StringInSlice check if string is present in slice of string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.