mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-09-27 03:15:55 +08:00
19 lines
215 B
Go
19 lines
215 B
Go
package slicex
|
|
|
|
import "fmt"
|
|
|
|
func ExampleIs() {
|
|
slice1 := []int{1, 2, 3}
|
|
slice2 := make(chan int)
|
|
|
|
res1 := Is(slice1)
|
|
res2 := Is(slice2)
|
|
|
|
fmt.Println(res1)
|
|
fmt.Println(res2)
|
|
|
|
// Output:
|
|
// true
|
|
// false
|
|
}
|