change pkg name

This commit is contained in:
2025-01-05 23:24:05 +07:00
parent 21f40f5873
commit 456e56ea37
2 changed files with 15 additions and 2 deletions

2
go.mod
View File

@@ -1,4 +1,4 @@
module crudgen module git.gogacoder.ru/NTO/crudgen
go 1.23 go 1.23

View File

@@ -280,7 +280,20 @@ func ImplementMethod(file *ast.File, methodDecl *ast.FuncDecl, reimplement bool)
} }
if reimplement || !methodImplemented { if reimplement || !methodImplemented {
file.Decls = append(decls, methodDecl) file.Decls = append(
decls,
&ast.FuncDecl{
Doc: methodDecl.Doc,
Recv: methodDecl.Recv,
Name: methodDecl.Name,
Type: methodDecl.Type,
Body: &ast.BlockStmt{
Lbrace: token.NoPos,
List: methodDecl.Body.List,
Rbrace: token.NoPos,
},
},
)
} }
// Reload AST: fix issues with syntax 'hallucinations' // Reload AST: fix issues with syntax 'hallucinations'