specified some flags to yaml.NewDecoder()
This commit is contained in:
parent
e12cd28413
commit
9addb5d35f
@ -169,7 +169,7 @@ func load_client_config_to(cfgfile string, cfg *ClientConfig) error {
|
|||||||
f, err = os.Open(cfgfile)
|
f, err = os.Open(cfgfile)
|
||||||
if err != nil { return err }
|
if err != nil { return err }
|
||||||
|
|
||||||
yd = yaml.NewDecoder(f)
|
yd = yaml.NewDecoder(f, yaml.AllowDuplicateMapKey(), yaml.DisallowUnknownField())
|
||||||
err = yd.Decode(cfg)
|
err = yd.Decode(cfg)
|
||||||
f.Close()
|
f.Close()
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user