1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-24 22:10:54 +00:00

Update parser.go

修复genRouterCode方法解析  router 注释(// @router) 单双引号引起的bug
This commit is contained in:
zwei0526 2020-04-26 19:26:10 +08:00 committed by GitHub
parent 8f3d1c5f42
commit ab33d683ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,7 +500,7 @@ func genRouterCode(pkgRealpath string) {
beego.GlobalControllerRouter["` + k + `"] = append(beego.GlobalControllerRouter["` + k + `"],
beego.ControllerComments{
Method: "` + strings.TrimSpace(c.Method) + `",
` + "Router: `" + c.Router + "`" + `,
` + `Router: "` + c.Router + `"` + `,
AllowHTTPMethods: ` + allmethod + `,
MethodParams: ` + methodParams + `,
Filters: ` + filters + `,