Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
7ef9b3d5
Commit
7ef9b3d5
authored
Nov 10, 2015
by
JessonChan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runnable typo fixed
parent
39e29caf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
router.go
router.go
+4
-4
No files found.
router.go
View file @
7ef9b3d5
...
...
@@ -717,18 +717,18 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if
doFilter
(
BeforeExec
)
{
goto
Admin
}
isRunable
:=
false
isRun
n
able
:=
false
if
routerInfo
!=
nil
{
if
routerInfo
.
routerType
==
routerTypeRESTFul
{
if
_
,
ok
:=
routerInfo
.
methods
[
r
.
Method
];
ok
{
isRunable
=
true
isRun
n
able
=
true
routerInfo
.
runFunction
(
context
)
}
else
{
exception
(
"405"
,
context
)
goto
Admin
}
}
else
if
routerInfo
.
routerType
==
routerTypeHandler
{
isRunable
=
true
isRun
n
able
=
true
routerInfo
.
handler
.
ServeHTTP
(
rw
,
r
)
}
else
{
runrouter
=
routerInfo
.
controllerType
...
...
@@ -750,7 +750,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
}
// also defined runrouter & runMethod from filter
if
!
isRunable
{
if
!
isRun
n
able
{
//Invoke the request handler
vc
:=
reflect
.
New
(
runrouter
)
execController
,
ok
:=
vc
.
Interface
()
.
(
ControllerInterface
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment