specified some flags to yaml.NewDecoder()

This commit is contained in:
hyung-hwan 2025-06-21 10:30:51 +09:00
parent e12cd28413
commit 9addb5d35f

View File

@ -169,7 +169,7 @@ func load_client_config_to(cfgfile string, cfg *ClientConfig) error {
f, err = os.Open(cfgfile)
if err != nil { return err }
yd = yaml.NewDecoder(f)
yd = yaml.NewDecoder(f, yaml.AllowDuplicateMapKey(), yaml.DisallowUnknownField())
err = yd.Decode(cfg)
f.Close()
return err