From 1ba97513c938dce57d33f1b54b70547a41e4ea13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20J=C3=BCrgensmeyer?= Date: Thu, 9 May 2024 09:56:48 +0200 Subject: [PATCH] Docs: Mention value from env as default value --- docs/v2/examples/flags.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/v2/examples/flags.md b/docs/v2/examples/flags.md index 2e79d3460f..f3792bff4b 100644 --- a/docs/v2/examples/flags.md +++ b/docs/v2/examples/flags.md @@ -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.