1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-16 02:12:16 +00:00

Merge pull request #2766 from yangsf5/master

sort ControllerComments
This commit is contained in:
astaxie
2017-07-17 11:02:28 +08:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ func genRouterCode(pkgRealpath string) {
sort.Strings(sortKey)
for _, k := range sortKey {
cList := genInfoList[k]
sort.Sort(ControllerCommentsSlice(cList))
for _, c := range cList {
allmethod := "nil"
if len(c.AllowHTTPMethods) > 0 {