refactor: switch to using Supply
This commit is contained in:
parent
24694ecbae
commit
af0f3e19de
|
@ -14,7 +14,6 @@ import (
|
||||||
"git.lumeweb.com/LumeWeb/portal/protocols"
|
"git.lumeweb.com/LumeWeb/portal/protocols"
|
||||||
"git.lumeweb.com/LumeWeb/portal/renter"
|
"git.lumeweb.com/LumeWeb/portal/renter"
|
||||||
"git.lumeweb.com/LumeWeb/portal/storage"
|
"git.lumeweb.com/LumeWeb/portal/storage"
|
||||||
"github.com/spf13/viper"
|
|
||||||
"go.uber.org/fx"
|
"go.uber.org/fx"
|
||||||
"go.uber.org/fx/fxevent"
|
"go.uber.org/fx/fxevent"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
@ -52,14 +51,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fx.New(
|
fx.New(
|
||||||
fx.Provide(_logger.NewFallbackLogger),
|
fx.Supply(config),
|
||||||
fx.Provide(func() *viper.Viper {
|
fx.Supply(logger),
|
||||||
return config
|
|
||||||
}),
|
|
||||||
|
|
||||||
fx.Decorate(func() *zap.Logger {
|
|
||||||
return logger
|
|
||||||
}),
|
|
||||||
fxLogger,
|
fxLogger,
|
||||||
fx.Invoke(initCheckRequiredConfig),
|
fx.Invoke(initCheckRequiredConfig),
|
||||||
fx.Provide(NewIdentity),
|
fx.Provide(NewIdentity),
|
||||||
|
|
Loading…
Reference in New Issue