mirror of
https://github.com/astaxie/beego.git
synced 2025-07-15 04:41:01 +00:00
fix #16
This commit is contained in:
6
beego.go
6
beego.go
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user