From 23deaedd39f502e88cedb0235e11244702403b17 Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 25 Jul 2013 15:50:16 +0800 Subject: [PATCH] add to beego --- beego.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beego.go b/beego.go index b37e84f2..c1354828 100644 --- a/beego.go +++ b/beego.go @@ -133,8 +133,8 @@ func (app *App) Run() { } } -func (app *App) Router(path string, c ControllerInterface) *App { - app.Handlers.Add(path, c) +func (app *App) Router(path string, c ControllerInterface, mappingMethods ...string) *App { + app.Handlers.Add(path, c, mappingMethods...) return app } @@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App { return BeeApp } -func Router(rootpath string, c ControllerInterface) *App { - BeeApp.Router(rootpath, c) +func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App { + BeeApp.Router(rootpath, c, mappingMethods...) return BeeApp }