diff --git a/README.md b/README.md index 9898e38..25e77f2 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ ucfg allows to automatically validate fields and set defaults for fields in case ```golang // Defines struct to read config from type ExampleConfig struct { - Counter string `config:"counter" validate:"min=0, max=9"` + Counter int `config:"counter" validate:"min=0, max=9"` } // Defines default config option @@ -71,12 +71,12 @@ func main() { appConfig := defaultConfig // copy default config so it's not overwritten config, err := yaml.NewConfigWithFile(path, ucfg.PathSep(".")) if err != nil { - fmt.Fprintln(err) + fmt.Println(err) os.Exit(1) } err = config.Unpack(&appConfig) if err != nil { - fmt.Fprintln(err) + fmt.Println(err) os.Exit(1) } }