diff --git a/adapter/app.go b/adapter/app.go index 2a5ff123..35570616 100644 --- a/adapter/app.go +++ b/adapter/app.go @@ -137,7 +137,7 @@ func RESTRouter(rootpath string, c ControllerInterface) *App { // AutoRouter adds defined controller handler to BeeApp. // 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. func AutoRouter(c ControllerInterface) *App { return (*App)(web.AutoRouter(c)) @@ -145,7 +145,7 @@ func AutoRouter(c ControllerInterface) *App { // AutoPrefix adds controller handler to BeeApp with prefix. // 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. func AutoPrefix(prefix string, c ControllerInterface) *App { return (*App)(web.AutoPrefix(prefix, c)) diff --git a/adapter/router.go b/adapter/router.go index 5011548e..a0add1fe 100644 --- a/adapter/router.go +++ b/adapter/router.go @@ -216,7 +216,7 @@ func (p *ControllerRegister) Handler(pattern string, h http.Handler, options ... } // AddAuto router to ControllerRegister. -// example beego.AddAuto(&MainContorlller{}), +// example beego.AddAuto(&MainController{}), // MainController has method List and Page. // visit the url /main/list to execute List 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. -// example beego.AddAutoPrefix("/admin",&MainContorlller{}), +// example beego.AddAutoPrefix("/admin",&MainController{}), // MainController has method List and Page. // visit the url /admin/main/list to execute List function // /admin/main/page to execute Page function. diff --git a/server/web/router.go b/server/web/router.go index e8e8e5d2..837fd93b 100644 --- a/server/web/router.go +++ b/server/web/router.go @@ -710,7 +710,7 @@ func (p *ControllerRegister) Handler(pattern string, h http.Handler, options ... } // AddAuto router to ControllerRegister. -// example beego.AddAuto(&MainContorlller{}), +// example beego.AddAuto(&MainController{}), // MainController has method List and Page. // visit the url /main/list to execute List 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. -// example beego.AddAutoPrefix("/admin",&MainContorlller{}), +// example beego.AddAutoPrefix("/admin",&MainController{}), // MainController has method List and Page. // visit the url /admin/main/list to execute List function // /admin/main/page to execute Page function. diff --git a/server/web/server.go b/server/web/server.go index 5851e0b8..8abaf047 100644 --- a/server/web/server.go +++ b/server/web/server.go @@ -437,7 +437,7 @@ func AutoRouter(c ControllerInterface) *HttpServer { // AutoRouter adds defined controller handler to BeeApp. // 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. func (app *HttpServer) AutoRouter(c ControllerInterface) *HttpServer { app.Handlers.AddAuto(c) @@ -451,7 +451,7 @@ func AutoPrefix(prefix string, c ControllerInterface) *HttpServer { // AutoPrefix adds controller handler to BeeApp with prefix. // 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. func (app *HttpServer) AutoPrefix(prefix string, c ControllerInterface) *HttpServer { app.Handlers.AddAutoPrefix(prefix, c)