diff --git a/contrib/config/etcd/README.md b/contrib/config/etcd/README.md index d76687458..d69edd82b 100644 --- a/contrib/config/etcd/README.md +++ b/contrib/config/etcd/README.md @@ -30,12 +30,16 @@ if err != nil { c := config.New(config.WithSource(source)) defer c.Close() +// load sources before get +if err := c.Load(); err != nil { + log.Fatalln(err) +} + // acquire config value foo, err := c.Value("/app-config").String() if err != nil { - log.Println(err) + log.Fatalln(err) } -println(foo) +log.Println(foo) ``` -