Documentation ¶
Index ¶
- func AddImport(astNode ast.Node, imp string)
- func AddRegisterTablesAst(path, funcName, pk, varName, dbName, model string)
- func AddRouterCode(path, funcName, pk, model string)
- func AppendNodeToList(stmts []ast.Stmt, stmt ast.Stmt, index int) []ast.Stmt
- func FindFunction(astNode ast.Node, FunctionName string) *ast.FuncDecl
- func ImportForAutoEnter(path string, funcName string, code string)
- func ImportReference(filepath, importCode, structName, packageName, groupName string) error
- func NeedAppendModel(callNode ast.Node, pk string, model string) bool
- func RollBackAst(pk, model string)
- func RollGormBack(pk, model string)
- func RollRouterBack(pk, model string)
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRegisterTablesAst ¶
func AddRegisterTablesAst(path, funcName, pk, varName, dbName, model string)
自动为 gorm.go 注册一个自动迁移
func AddRouterCode ¶
func AddRouterCode(path, funcName, pk, model string)
func AppendNodeToList ¶
func FindFunction ¶
查询特定function方法
func ImportForAutoEnter ¶
func ImportReference ¶
func NeedAppendModel ¶
为automigrate增加实参
func RollBackAst ¶
func RollBackAst(pk, model string)
func RollGormBack ¶
func RollGormBack(pk, model string)
func RollRouterBack ¶
func RollRouterBack(pk, model string)
Types ¶
Click to show internal directories.
Click to hide internal directories.