1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-04 09:40:19 +00:00

move initmime from beego.Run to hookfunc

This commit is contained in:
astaxie
2013-12-31 00:34:47 +08:00
parent eea272482b
commit 383a04f4c2
2 changed files with 4 additions and 4 deletions

View File

@ -18,6 +18,8 @@ var hooks []hookfunc //hook function slice to store the hookfunc
func init() {
hooks = make([]hookfunc, 0)
//init mime
AddAPPStartHook(initMime)
}
// Router adds a patterned controller handler to BeeApp.
@ -112,9 +114,6 @@ func Run() {
}
}
//init mime
initMime()
// do hooks function
for _, hk := range hooks {
err := hk()