Refactor App to use DI

This commit is contained in:
Deluan
2020-01-11 13:00:03 -05:00
committed by Deluan Quintão
parent 30ebbc1fa1
commit 408030eb6c
4 changed files with 28 additions and 25 deletions
+6 -3
View File
@@ -24,11 +24,14 @@ var allProviders = wire.NewSet(
api.NewRouter,
)
func initRouter() *api.Router {
panic(wire.Build(allProviders))
func createApp(musicFolder string) *App {
panic(wire.Build(
NewApp,
allProviders,
))
}
func initImporter(musicFolder string) *scanner.Importer {
func initRouter() *api.Router {
panic(wire.Build(allProviders))
}