fix comment
change MainContorlller to MainController
This commit is contained in:
parent
12af439a9c
commit
005b8b5813
@ -137,7 +137,7 @@ func RESTRouter(rootpath string, c ControllerInterface) *App {
|
|||||||
|
|
||||||
// AutoRouter adds defined controller handler to BeeApp.
|
// AutoRouter adds defined controller handler to BeeApp.
|
||||||
// it's same to HttpServer.AutoRouter.
|
// it's same to HttpServer.AutoRouter.
|
||||||
// if beego.AddAuto(&MainContorlller{}) and MainController has methods List and Page,
|
// if beego.AddAuto(&MainController{}) and MainController has methods List and Page,
|
||||||
// visit the url /main/list to exec List function or /main/page to exec Page function.
|
// visit the url /main/list to exec List function or /main/page to exec Page function.
|
||||||
func AutoRouter(c ControllerInterface) *App {
|
func AutoRouter(c ControllerInterface) *App {
|
||||||
return (*App)(web.AutoRouter(c))
|
return (*App)(web.AutoRouter(c))
|
||||||
@ -145,7 +145,7 @@ func AutoRouter(c ControllerInterface) *App {
|
|||||||
|
|
||||||
// AutoPrefix adds controller handler to BeeApp with prefix.
|
// AutoPrefix adds controller handler to BeeApp with prefix.
|
||||||
// it's same to HttpServer.AutoRouterWithPrefix.
|
// it's same to HttpServer.AutoRouterWithPrefix.
|
||||||
// if beego.AutoPrefix("/admin",&MainContorlller{}) and MainController has methods List and Page,
|
// if beego.AutoPrefix("/admin",&MainController{}) and MainController has methods List and Page,
|
||||||
// visit the url /admin/main/list to exec List function or /admin/main/page to exec Page function.
|
// visit the url /admin/main/list to exec List function or /admin/main/page to exec Page function.
|
||||||
func AutoPrefix(prefix string, c ControllerInterface) *App {
|
func AutoPrefix(prefix string, c ControllerInterface) *App {
|
||||||
return (*App)(web.AutoPrefix(prefix, c))
|
return (*App)(web.AutoPrefix(prefix, c))
|
||||||
|
|||||||
@ -216,7 +216,7 @@ func (p *ControllerRegister) Handler(pattern string, h http.Handler, options ...
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddAuto router to ControllerRegister.
|
// AddAuto router to ControllerRegister.
|
||||||
// example beego.AddAuto(&MainContorlller{}),
|
// example beego.AddAuto(&MainController{}),
|
||||||
// MainController has method List and Page.
|
// MainController has method List and Page.
|
||||||
// visit the url /main/list to execute List function
|
// visit the url /main/list to execute List function
|
||||||
// /main/page to execute Page function.
|
// /main/page to execute Page function.
|
||||||
@ -225,7 +225,7 @@ func (p *ControllerRegister) AddAuto(c ControllerInterface) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddAutoPrefix Add auto router to ControllerRegister with prefix.
|
// AddAutoPrefix Add auto router to ControllerRegister with prefix.
|
||||||
// example beego.AddAutoPrefix("/admin",&MainContorlller{}),
|
// example beego.AddAutoPrefix("/admin",&MainController{}),
|
||||||
// MainController has method List and Page.
|
// MainController has method List and Page.
|
||||||
// visit the url /admin/main/list to execute List function
|
// visit the url /admin/main/list to execute List function
|
||||||
// /admin/main/page to execute Page function.
|
// /admin/main/page to execute Page function.
|
||||||
|
|||||||
@ -710,7 +710,7 @@ func (p *ControllerRegister) Handler(pattern string, h http.Handler, options ...
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddAuto router to ControllerRegister.
|
// AddAuto router to ControllerRegister.
|
||||||
// example beego.AddAuto(&MainContorlller{}),
|
// example beego.AddAuto(&MainController{}),
|
||||||
// MainController has method List and Page.
|
// MainController has method List and Page.
|
||||||
// visit the url /main/list to execute List function
|
// visit the url /main/list to execute List function
|
||||||
// /main/page to execute Page function.
|
// /main/page to execute Page function.
|
||||||
@ -719,7 +719,7 @@ func (p *ControllerRegister) AddAuto(c ControllerInterface) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AddAutoPrefix Add auto router to ControllerRegister with prefix.
|
// AddAutoPrefix Add auto router to ControllerRegister with prefix.
|
||||||
// example beego.AddAutoPrefix("/admin",&MainContorlller{}),
|
// example beego.AddAutoPrefix("/admin",&MainController{}),
|
||||||
// MainController has method List and Page.
|
// MainController has method List and Page.
|
||||||
// visit the url /admin/main/list to execute List function
|
// visit the url /admin/main/list to execute List function
|
||||||
// /admin/main/page to execute Page function.
|
// /admin/main/page to execute Page function.
|
||||||
|
|||||||
@ -437,7 +437,7 @@ func AutoRouter(c ControllerInterface) *HttpServer {
|
|||||||
|
|
||||||
// AutoRouter adds defined controller handler to BeeApp.
|
// AutoRouter adds defined controller handler to BeeApp.
|
||||||
// it's same to HttpServer.AutoRouter.
|
// it's same to HttpServer.AutoRouter.
|
||||||
// if beego.AddAuto(&MainContorlller{}) and MainController has methods List and Page,
|
// if beego.AddAuto(&MainController{}) and MainController has methods List and Page,
|
||||||
// visit the url /main/list to exec List function or /main/page to exec Page function.
|
// visit the url /main/list to exec List function or /main/page to exec Page function.
|
||||||
func (app *HttpServer) AutoRouter(c ControllerInterface) *HttpServer {
|
func (app *HttpServer) AutoRouter(c ControllerInterface) *HttpServer {
|
||||||
app.Handlers.AddAuto(c)
|
app.Handlers.AddAuto(c)
|
||||||
@ -451,7 +451,7 @@ func AutoPrefix(prefix string, c ControllerInterface) *HttpServer {
|
|||||||
|
|
||||||
// AutoPrefix adds controller handler to BeeApp with prefix.
|
// AutoPrefix adds controller handler to BeeApp with prefix.
|
||||||
// it's same to HttpServer.AutoRouterWithPrefix.
|
// it's same to HttpServer.AutoRouterWithPrefix.
|
||||||
// if beego.AutoPrefix("/admin",&MainContorlller{}) and MainController has methods List and Page,
|
// if beego.AutoPrefix("/admin",&MainController{}) and MainController has methods List and Page,
|
||||||
// visit the url /admin/main/list to exec List function or /admin/main/page to exec Page function.
|
// visit the url /admin/main/list to exec List function or /admin/main/page to exec Page function.
|
||||||
func (app *HttpServer) AutoPrefix(prefix string, c ControllerInterface) *HttpServer {
|
func (app *HttpServer) AutoPrefix(prefix string, c ControllerInterface) *HttpServer {
|
||||||
app.Handlers.AddAutoPrefix(prefix, c)
|
app.Handlers.AddAutoPrefix(prefix, c)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user