mirror of
https://github.com/spf13/viper
synced 2024-12-23 03:57:01 +00:00
update README.md
This commit is contained in:
parent
5736fabdfa
commit
23d0f4785a
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ currently a single viper only supports a single config file.
|
||||||
panic(fmt.Errorf("Fatal error config file: %s \n", err))
|
panic(fmt.Errorf("Fatal error config file: %s \n", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
### Reading Config from bytes.Buffer
|
### Reading Config from io.Reader
|
||||||
|
|
||||||
Viper predefined many configuration sources, such as files, environment variables, flags and
|
Viper predefined many configuration sources, such as files, environment variables, flags and
|
||||||
remote K/V store. But you are not bound to them. You can also implement your own way to
|
remote K/V store. But you are not bound to them. You can also implement your own way to
|
||||||
|
@ -107,7 +107,7 @@ eyes : brown
|
||||||
beard: true
|
beard: true
|
||||||
`)
|
`)
|
||||||
|
|
||||||
viper.ReadBufConfig(bytes.NewBuffer(yamlExample))
|
viper.ReadConfig(bytes.NewBuffer(yamlExample))
|
||||||
|
|
||||||
viper.Get("name") // this would be "steve"
|
viper.Get("name") // this would be "steve"
|
||||||
````
|
````
|
||||||
|
|
Loading…
Reference in a new issue