fix FilePath documentation in README.md

This commit is contained in:
Brad Rydzewski
2017-04-10 16:45:51 +02:00
committed by Jacob McCann
parent 4cc453ba67
commit 18a556e192
4 changed files with 58 additions and 16 deletions

View File

@@ -588,13 +588,13 @@ func main() {
}
```
#### Values from Files
#### Values from files
You can also have the default value set from file via `FilePath`. e.g.
<!-- {
"args": ["&#45;&#45;help"],
"output": "language for the greeting.*APP_LANG"
"output": "password for the mysql database"
} -->
``` go
package main
@@ -620,6 +620,9 @@ func main() {
}
```
Note that default values set from file (e.g. `FilePath`) take precedence over
default values set from the enviornment (e.g. `EnvVar`).
#### Values from alternate input sources (YAML, TOML, and others)
There is a separate package altsrc that adds support for getting flag values