Skip to content

Commit 1512a55

Browse files
authored
Merge pull request #17 from sigam-Zq/main
fix:修复模板关键字
2 parents e4be9cc + 20b70aa commit 1512a55

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: build
22

3-
RELEASE_VERSION = v10.3.3
3+
RELEASE_VERSION = v10.3.4
44

55
APP = gin-admin-cli
66
BIN = ${APP}

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
//go:embed tpls
1414
var f embed.FS
1515

16-
var VERSION = "v10.3.3"
16+
var VERSION = "v10.3.4"
1717

1818
func main() {
1919
defer func() {

tpls/default/api.go.tpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type {{$name}} struct {
3131
// @Success 200 {object} util.ResponseResult{data=[]schema.{{$name}}}
3232
// @Failure 401 {object} util.ResponseResult
3333
// @Failure 500 {object} util.ResponseResult
34-
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .ModuleName}}/{{end}}{{lowerHyphensPlural .Name}} [get]
34+
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .Module}}/{{end}}{{lowerHyphensPlural .Name}} [get]
3535
func (a *{{$name}}) Query(c *gin.Context) {
3636
ctx := c.Request.Context()
3737
var params schema.{{$name}}QueryParam
@@ -55,7 +55,7 @@ func (a *{{$name}}) Query(c *gin.Context) {
5555
// @Success 200 {object} util.ResponseResult{data=schema.{{$name}}}
5656
// @Failure 401 {object} util.ResponseResult
5757
// @Failure 500 {object} util.ResponseResult
58-
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .ModuleName}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [get]
58+
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .Module}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [get]
5959
func (a *{{$name}}) Get(c *gin.Context) {
6060
ctx := c.Request.Context()
6161
item, err := a.{{$name}}BIZ.Get(ctx, c.Param("id"))
@@ -74,7 +74,7 @@ func (a *{{$name}}) Get(c *gin.Context) {
7474
// @Failure 400 {object} util.ResponseResult
7575
// @Failure 401 {object} util.ResponseResult
7676
// @Failure 500 {object} util.ResponseResult
77-
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .ModuleName}}/{{end}}{{lowerHyphensPlural .Name}} [post]
77+
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .Module}}/{{end}}{{lowerHyphensPlural .Name}} [post]
7878
func (a *{{$name}}) Create(c *gin.Context) {
7979
ctx := c.Request.Context()
8080
item := new(schema.{{$name}}Form)
@@ -103,7 +103,7 @@ func (a *{{$name}}) Create(c *gin.Context) {
103103
// @Failure 400 {object} util.ResponseResult
104104
// @Failure 401 {object} util.ResponseResult
105105
// @Failure 500 {object} util.ResponseResult
106-
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .ModuleName}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [put]
106+
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .Module}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [put]
107107
func (a *{{$name}}) Update(c *gin.Context) {
108108
ctx := c.Request.Context()
109109
item := new(schema.{{$name}}Form)
@@ -130,7 +130,7 @@ func (a *{{$name}}) Update(c *gin.Context) {
130130
// @Success 200 {object} util.ResponseResult
131131
// @Failure 401 {object} util.ResponseResult
132132
// @Failure 500 {object} util.ResponseResult
133-
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .ModuleName}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [delete]
133+
// @Router /api/v1/{{if .FillRouterPrefix}}{{lower .Module}}/{{end}}{{lowerHyphensPlural .Name}}/{id} [delete]
134134
func (a *{{$name}}) Delete(c *gin.Context) {
135135
ctx := c.Request.Context()
136136
err := a.{{$name}}BIZ.Delete(ctx, c.Param("id"))

0 commit comments

Comments
 (0)