mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
DissallowUnkownFields in config
This commit is contained in:
parent
471470a253
commit
e36af35aad
1 changed files with 1 additions and 0 deletions
|
@ -19,6 +19,7 @@ func LoadConfiguration(file string) (*definitions.Config, error) {
|
|||
fmt.Println(err.Error())
|
||||
}
|
||||
jsonParser := json.NewDecoder(configFile)
|
||||
jsonParser.DisallowUnknownFields()
|
||||
err = jsonParser.Decode(&config)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("decoding Config File %w", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue