We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d28bfe commit 3d6b56aCopy full SHA for 3d6b56a
pkg/config/loader.go
@@ -185,7 +185,7 @@ func (l *Loader) parseConfig() error {
185
// Load configuration from flags only.
186
err = l.viper.Unmarshal(l.cfg)
187
if err != nil {
188
- return err
+ return fmt.Errorf("can't unmarshal config by viper (flags): %w", err)
189
}
190
191
return nil
@@ -201,7 +201,7 @@ func (l *Loader) parseConfig() error {
201
202
// Load configuration from all sources (flags, file).
203
if err := l.viper.Unmarshal(l.cfg, fileDecoderHook()); err != nil {
204
- return fmt.Errorf("can't unmarshal config by viper: %w", err)
+ return fmt.Errorf("can't unmarshal config by viper (flags, file): %w", err)
205
206
207
if l.cfg.InternalTest { // just for testing purposes: to detect config file usage
0 commit comments