Skip to content

Commit

Permalink
fix: added error unused decoder setting
Browse files Browse the repository at this point in the history
Now if user provides the unknown key the error will be thrown

Closes #176
  • Loading branch information
wwoytenko committed Aug 24, 2024
1 parent a2ecc2c commit c653498
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/greenmask/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func initConfig() {
mapstructure.StringToTimeDurationHookFunc(),
mapstructure.StringToSliceHookFunc(","),
)
cfg.ErrorUnused = true
}

if err := viper.Unmarshal(Config, decoderCfg); err != nil {
Expand Down

0 comments on commit c653498

Please sign in to comment.