remove error form accounts' EnsureDefaults() function

This commit is contained in:
Willy Kloucek
2022-03-11 13:43:34 +01:00
parent 9a4737d3ed
commit c829dbe577
2 changed files with 2 additions and 7 deletions
@@ -78,7 +78,7 @@ func DefaultConfig() *config.Config {
} }
} }
func EnsureDefaults(cfg *config.Config) error { func EnsureDefaults(cfg *config.Config) {
// provide with defaults for shared logging, since we need a valid destination address for BindEnv. // provide with defaults for shared logging, since we need a valid destination address for BindEnv.
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil { if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
cfg.Log = &config.Log{ cfg.Log = &config.Log{
@@ -101,8 +101,6 @@ func EnsureDefaults(cfg *config.Config) error {
} else if cfg.Tracing == nil { } else if cfg.Tracing == nil {
cfg.Tracing = &config.Tracing{} cfg.Tracing = &config.Tracing{}
} }
return nil
} }
func Sanitize(cfg *config.Config) { func Sanitize(cfg *config.Config) {
+1 -4
View File
@@ -17,10 +17,7 @@ func ParseConfig(cfg *config.Config) error {
return err return err
} }
err = defaults.EnsureDefaults(cfg) defaults.EnsureDefaults(cfg)
if err != nil {
return err
}
// load all env variables relevant to the config in the current context. // load all env variables relevant to the config in the current context.
if err := envdecode.Decode(cfg); err != nil { if err := envdecode.Decode(cfg); err != nil {