feat: many2many relations check
This commit is contained in:
11
common/isSlice.go
Normal file
11
common/isSlice.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package common
|
||||
|
||||
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