Rename ConfigParams to Params to avoid stuttering
This commit is contained in:
@@ -18,8 +18,8 @@ const (
|
|||||||
DefaultStateDir = "./data"
|
DefaultStateDir = "./data"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ConfigParams defines dependencies for Config.
|
// Params defines dependencies for Config.
|
||||||
type ConfigParams struct {
|
type Params struct {
|
||||||
fx.In
|
fx.In
|
||||||
Globals *globals.Globals
|
Globals *globals.Globals
|
||||||
Logger *logger.Logger
|
Logger *logger.Logger
|
||||||
@@ -38,7 +38,7 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Config instance by loading configuration from file.
|
// New creates a new Config instance by loading configuration from file.
|
||||||
func New(lc fx.Lifecycle, params ConfigParams) (*Config, error) {
|
func New(lc fx.Lifecycle, params Params) (*Config, error) {
|
||||||
log := params.Logger.Get()
|
log := params.Logger.Get()
|
||||||
name := params.Globals.Appname
|
name := params.Globals.Appname
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user