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
a8c2deb0
authored
2014-03-12 18:56:12 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #530 from cnphpbb/develop
Update beego.go - Slice types exist trap
2 parents
624f6258
0f015d75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
beego.go
beego.go
View file @
a8c2deb
...
...
@@ -28,12 +28,12 @@ type GroupRouters []groupRouter
// Get a new GroupRouters
func
NewGroupRouters
()
GroupRouters
{
return
make
(
[]
groupRouter
,
0
)
return
make
(
GroupRouters
,
0
)
}
// Add Router in the GroupRouters
// it is for plugin or module to register router
func
(
gr
GroupRouters
)
AddRouter
(
pattern
string
,
c
ControllerInterface
,
mappingMethod
...
string
)
{
func
(
gr
*
GroupRouters
)
AddRouter
(
pattern
string
,
c
ControllerInterface
,
mappingMethod
...
string
)
{
var
newRG
groupRouter
if
len
(
mappingMethod
)
>
0
{
newRG
=
groupRouter
{
...
...
@@ -48,16 +48,16 @@ func (gr GroupRouters) AddRouter(pattern string, c ControllerInterface, mappingM
""
,
}
}
gr
=
append
(
gr
,
newRG
)
*
gr
=
append
(
*
gr
,
newRG
)
}
func
(
gr
GroupRouters
)
AddAuto
(
c
ControllerInterface
)
{
func
(
gr
*
GroupRouters
)
AddAuto
(
c
ControllerInterface
)
{
newRG
:=
groupRouter
{
""
,
c
,
""
,
}
gr
=
append
(
gr
,
newRG
)
*
gr
=
append
(
*
gr
,
newRG
)
}
// AddGroupRouter with the prefix
...
...
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