Merge pull request #2032 from ShevYan/make-go-vet-pass

use keyed fields to pass go vet
This commit is contained in:
astaxie 2016-07-14 10:38:05 +08:00 committed by GitHub
commit a08e937cf0
1 changed files with 4 additions and 4 deletions

View File

@ -166,10 +166,10 @@ func genRouterCode(pkgRealpath string) {
globalinfo = globalinfo + `
beego.GlobalControllerRouter["` + k + `"] = append(beego.GlobalControllerRouter["` + k + `"],
beego.ControllerComments{
"` + strings.TrimSpace(c.Method) + `",
` + "`" + c.Router + "`" + `,
` + allmethod + `,
` + params + `})
Method: "` + strings.TrimSpace(c.Method) + `",
` + "Router: `" + c.Router + "`" + `,
AllowHTTPMethods: ` + allmethod + `,
Params: ` + params + `})
`
}
}