Files
nto-cli/utils/is_slice.go

12 lines
166 B
Go

package utils
import "go/ast"
func IsSlice(expr ast.Expr) bool {
arrayType, ok := expr.(*ast.ArrayType)
if !ok {
return false
}
return arrayType.Len == nil
}