mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-27 19:53:41 +08:00
feature (dynamic): make configuration dynamic
This commit is contained in:
11
cmd/main.go
11
cmd/main.go
@ -27,6 +27,11 @@ func start(routes *mux.Router) {
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
InitConfig()
|
||||
InitPluginList(embed.EmbedPluginList)
|
||||
for _, fn := range Hooks.Get.Onload() {
|
||||
fn()
|
||||
}
|
||||
var wg sync.WaitGroup
|
||||
for _, obj := range Hooks.Get.Starter() {
|
||||
wg.Add(1)
|
||||
@ -35,11 +40,5 @@ func start(routes *mux.Router) {
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
go func() {
|
||||
InitPluginList(embed.EmbedPluginList)
|
||||
for _, fn := range Hooks.Get.Onload() {
|
||||
go fn()
|
||||
}
|
||||
}()
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user