Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e1d7bc88
authored
2015-06-08 17:25:46 +0800
by
空见
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
remove space after int()& add sort for commentsRouter file
1 parent
499ee09d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
parser.go
parser.go
View file @
e1d7bc8
...
...
@@ -24,6 +24,7 @@ import (
"io/ioutil"
"os"
"path"
"sort"
"strings"
"github.com/astaxie/beego/utils"
...
...
@@ -36,7 +37,7 @@ import (
)
func init() {
{{.globalinfo}}
{{.globalinfo}}
}
`
...
...
@@ -129,7 +130,13 @@ func genRouterCode() {
os
.
Mkdir
(
path
.
Join
(
workPath
,
"routers"
),
0755
)
Info
(
"generate router from comments"
)
var
globalinfo
string
for
k
,
cList
:=
range
genInfoList
{
sortKey
:=
make
([]
string
,
0
)
for
k
,
_
:=
range
genInfoList
{
sortKey
=
append
(
sortKey
,
k
)
}
sort
.
Strings
(
sortKey
)
for
_
,
k
:=
range
sortKey
{
cList
:=
genInfoList
[
k
]
for
_
,
c
:=
range
cList
{
allmethod
:=
"nil"
if
len
(
c
.
AllowHTTPMethods
)
>
0
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment