mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 01:00:54 +00:00
move initmime from beego.Run to hookfunc
This commit is contained in:
parent
eea272482b
commit
383a04f4c2
5
beego.go
5
beego.go
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user