1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-15 04:41:01 +00:00
This commit is contained in:
astaxie
2013-05-07 00:17:25 +08:00
parent 93babc5780
commit 1e7c1a265e
5 changed files with 1290 additions and 1015 deletions

View File

@ -148,6 +148,11 @@ func RouterHandler(path string, c http.Handler) *App {
return BeeApp
}
func Errorhandler(err string, h http.HandlerFunc) *App {
ErrorMaps[err] = h
return BeeApp
}
func SetViewsPath(path string) *App {
BeeApp.SetViewsPath(path)
return BeeApp
@ -195,5 +200,6 @@ func Run() {
}
}
runtime.GOMAXPROCS(runtime.NumCPU())
registerErrorHander()
BeeApp.Run()
}