Merge pull request #4697 from suchen9209/develop

fix comment
This commit is contained in:
jianzhiyao 2021-07-21 10:44:03 +08:00 committed by GitHub
commit 8fc3d7c700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -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))

View File

@ -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.

View File

@ -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.

View File

@ -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)