mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-09-27 03:15:55 +08:00
9 lines
160 B
Go
9 lines
160 B
Go
package slicex
|
|
|
|
import "reflect"
|
|
|
|
// Is 判断指定值i是否是slice类型
|
|
func Is(slice any) bool {
|
|
return reflect.ValueOf(slice).Kind() == reflect.Slice
|
|
}
|