Browse Source

typo

master
Lars Hoogestraat 3 years ago
parent
commit
8733aa2f12
  1. 6
      README.md
  2. 2
      cfg.go

6
README.md

@ -56,9 +56,9 @@ Unmarshal config into struct
panic(err)
}
for k, v := range def { // applied defaults
fmt.Printf("using default value %s for key %s\n", v.Value, k)
}
for k, v := range def { // applied defaults
fmt.Printf("using default value %s for key %s\n", v.Value, k)
}
fmt.Println(settings.ServerPort)
fmt.Println(settings.Filesize)

2
cfg.go

@ -241,7 +241,7 @@ func setFields(kv map[string]string, defaults map[string]Defaults, dest interfac
if err != nil {
if def != (Defaults{}) {
//ignore error here if default key has a default
//ignore error here if key has a default
continue
}
return fmt.Errorf("error while setting value [%s] for key [%s] error %v", value, sKey, err)

Loading…
Cancel
Save