mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 18:40:34 +07:00
feat: new parser & generator
This commit is contained in:
11
utils/is_slice.go
Normal file
11
utils/is_slice.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package utils
|
||||
|
||||
import "go/ast"
|
||||
|
||||
func IsSlice(expr ast.Expr) bool {
|
||||
arrayType, ok := expr.(*ast.ArrayType)
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
return arrayType.Len == nil
|
||||
}
|
||||
Reference in New Issue
Block a user