mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-09-27 03:15:55 +08:00
14 lines
189 B
Go
14 lines
189 B
Go
package slicex
|
|
|
|
import "fmt"
|
|
|
|
func ExampleIn() {
|
|
slice := []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}
|
|
res := In("c", slice)
|
|
|
|
fmt.Println(res)
|
|
|
|
// Output:
|
|
// true
|
|
}
|