diff --git a/internal/writer.go b/internal/writer.go index 4d80636..fab0515 100644 --- a/internal/writer.go +++ b/internal/writer.go @@ -228,7 +228,7 @@ func ImplementCrudMethods(modelName string, serviceName string, file *ast.File, EntityPlural: ToPlural(modelName), } - for _, methodName := range []string{CreateMethod, GetAllMethod, GetByIdMethod, UpdateMethod, CountMethod} { + for _, methodName := range []string{CreateMethod, GetAllMethod, GetByIdMethod, UpdateMethod, DeleteMethod, CountMethod} { methodCode := GenerateCrudMethodCode(methodName, templateContext) methodDecl, err := MethodCodeToDeclaration(methodCode) if err != nil {