Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/handlergen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ func main() {
funcContent += fmt.Sprintf("// @Description%s \n", nameArr[1])
// Tags
funcContent += fmt.Sprintf("%s \n", v.Decorations().Start.All()[1])
funcContent += fmt.Sprintf("// @Accept application/x-www-form-urlencoded \n")
funcContent += fmt.Sprintf("// @Produce json \n")
funcContent += "// @Accept application/x-www-form-urlencoded \n"
funcContent += "// @Produce json \n"
funcContent += fmt.Sprintf("// @Param Request body %sRequest true \"请求信息\" \n", Lcfirst(v.Names[0].String()))
funcContent += fmt.Sprintf("// @Success 200 {object} %sResponse \n", Lcfirst(v.Names[0].String()))
funcContent += fmt.Sprintf("// @Failure 400 {object} code.Failure \n")
funcContent += "// @Failure 400 {object} code.Failure \n"
// Router
funcContent += fmt.Sprintf("%s \n", v.Decorations().Start.All()[2])
funcContent += fmt.Sprintf("func (h *handler) %s() core.HandlerFunc { \n return func(ctx core.Context) {\n\n}}", v.Names[0].String())
Expand Down
2 changes: 1 addition & 1 deletion cmd/mysqlmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func main() {
fmt.Println(" └── file : ", table.Name+"/gen_model.go")

modelContent := fmt.Sprintf("package %s\n", table.Name)
modelContent += fmt.Sprintf(`import "time"`)
modelContent += `import "time"`
modelContent += fmt.Sprintf("\n\n// %s %s \n", capitalize(table.Name), table.Comment.String)
modelContent += fmt.Sprintf("//go:generate gormgen -structs %s -input . \n", capitalize(table.Name))
modelContent += fmt.Sprintf("type %s struct {\n", capitalize(table.Name))
Expand Down