Skip to content

Commit

Permalink
Use UnmarshalStrict for config file to catch config errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chr4 committed Mar 14, 2021
1 parent 30a2180 commit 366c38c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func LoadConfig(configFile string) (Config, error) {
return Config{}, err
}
var cfg Config
if err = yaml.Unmarshal(configData, &cfg); err != nil {
if err = yaml.UnmarshalStrict(configData, &cfg); err != nil {
return cfg, err
}
if cfg.MQTT == nil {
Expand Down

0 comments on commit 366c38c

Please sign in to comment.