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
5a529497
authored
2014-04-09 21:42:57 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
beego: support not-empty value in router fix #555
1 parent
f9cc9e9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
router.go
router.go
View file @
5a52949
...
...
@@ -109,6 +109,10 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
expr
=
`([\w]+)`
part
=
part
[
:
lindex
]
}
//marth /user/:id! non-empty value
}
else
if
part
[
len
(
part
)
-
1
]
==
'!'
{
expr
=
`(.+)`
part
=
part
[
:
len
(
part
)
-
1
]
}
params
[
j
]
=
part
parts
[
i
]
=
expr
...
...
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