Make minor copy-editing changes to README.md

This commit is contained in:
Anthony Fok 2017-07-21 04:20:10 -06:00
parent c1de95864d
commit df7314a14e

View file

@ -6,7 +6,7 @@ Many Go projects are built using Viper including:
* [Hugo](http://gohugo.io) * [Hugo](http://gohugo.io)
* [EMC RexRay](http://rexray.readthedocs.org/en/stable/) * [EMC RexRay](http://rexray.readthedocs.org/en/stable/)
* [Imgur's Incus](https://github.com/Imgur/incus) * [Imgurs Incus](https://github.com/Imgur/incus)
* [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack) * [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack)
* [Docker Notary](https://github.com/docker/Notary) * [Docker Notary](https://github.com/docker/Notary)
* [BloomApi](https://www.bloomapi.com/) * [BloomApi](https://www.bloomapi.com/)
@ -17,7 +17,7 @@ Many Go projects are built using Viper including:
## What is Viper? ## What is Viper?
Viper is a complete configuration solution for go applications including 12 factor apps. It is designed Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed
to work within an application, and can handle all types of configuration needs to work within an application, and can handle all types of configuration needs
and formats. It supports: and formats. It supports:
@ -68,7 +68,7 @@ Viper configuration keys are case insensitive.
### Establishing Defaults ### Establishing Defaults
A good configuration system will support default values. A default value is not A good configuration system will support default values. A default value is not
required for a key, but it's useful in the event that a key hasnt been set via required for a key, but its useful in the event that a key hasnt been set via
config file, environment variable, remote configuration or flag. config file, environment variable, remote configuration or flag.
Examples: Examples:
@ -271,7 +271,7 @@ func main() {
#### Flag interfaces #### Flag interfaces
Viper provides two Go interfaces to bind other flag systems if you don't use `Pflags`. Viper provides two Go interfaces to bind other flag systems if you dont use `Pflags`.
`FlagValue` represents a single flag. This is a very simple example on how to implement this interface: `FlagValue` represents a single flag. This is a very simple example on how to implement this interface:
@ -401,7 +401,7 @@ go func(){
## Getting Values From Viper ## Getting Values From Viper
In Viper, there are a few ways to get a value depending on the value's type. In Viper, there are a few ways to get a value depending on the values type.
The following functions and methods exist: The following functions and methods exist:
* `Get(key string) : interface{}` * `Get(key string) : interface{}`
@ -531,7 +531,7 @@ func NewCache(cfg *Viper) *Cache {...}
``` ```
which creates a cache based on config information formatted as `subv`. which creates a cache based on config information formatted as `subv`.
Now it's easy to create these 2 caches separately as: Now its easy to create these 2 caches separately as:
```go ```go
cfg1 := viper.Sub("app.cache1") cfg1 := viper.Sub("app.cache1")