Skip to content

Commit da85d0c

Browse files
authored
Merge pull request #1910 from sj14/sj/default-arg-value
v2 Docs: Mention value from env as default value
2 parents a1a099b + 1ba9751 commit da85d0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/v2/examples/flags.md

+2
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ func main() {
470470
}
471471
```
472472

473+
When `Value` is not set for the flag, but a matching environment variable is found, the value from the environment will be used in the generated docs as the default value.
474+
473475
#### Values from files
474476

475477
You can also have the default value set from file via `FilePath`. e.g.

0 commit comments

Comments
 (0)