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
3d20c0b8
Commit
3d20c0b8
authored
Apr 07, 2017
by
astaxie
Committed by
GitHub
Apr 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2543 from Bobochka/fix_route_hander_docs
Fix example for Hander func
parents
a4fb4c6a
fb04d3cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app.go
app.go
+3
-3
No files found.
app.go
View file @
3d20c0b8
...
...
@@ -348,9 +348,9 @@ func Any(rootpath string, f FilterFunc) *App {
// Handler used to register a Handler router
// usage:
// beego.Handler("/api",
func(ctx *context.Context)
{
//
ctx.Output.Body("hello world"
)
// })
// beego.Handler("/api",
http.HandlerFunc(func (w http.ResponseWriter, r *http.Request)
{
//
fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)
)
// })
)
func
Handler
(
rootpath
string
,
h
http
.
Handler
,
options
...
interface
{})
*
App
{
BeeApp
.
Handlers
.
Handler
(
rootpath
,
h
,
options
...
)
return
BeeApp
...
...
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