feat: foreignKeys check

+fix: "unnamed" field bug
This commit is contained in:
2024-12-30 23:44:24 +07:00
parent ece3f3c801
commit 03ccaff375
10 changed files with 123 additions and 21 deletions

View File

@@ -12,10 +12,3 @@ func CheckUnnamedModel(typeSpec ast.TypeSpec) error {
}
return nil
}
func CheckUnnamedField(structName string, field ast.Field) error {
if len(field.Names) == 0 {
return errors.New(fmt.Sprintf("Struct \"%s\" has unnamed field", structName))
}
return nil
}