Skip to content

Commit

Permalink
Merge pull request #1910 from sj14/sj/default-arg-value
Browse files Browse the repository at this point in the history
v2 Docs: Mention value from env as default value
  • Loading branch information
bartekpacia committed May 9, 2024
2 parents a1a099b + 1ba9751 commit da85d0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/v2/examples/flags.md
Expand Up @@ -470,6 +470,8 @@ func main() {
}
```

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.

#### Values from files

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

0 comments on commit da85d0c

Please sign in to comment.