Skip to content

docs: document that an empty env var falls back to envDefault - #432

Open
Pastalikek65 wants to merge 1 commit into
caarlos0:mainfrom
Pastalikek65:docs-empty-env-fallback
Open

docs: document that an empty env var falls back to envDefault#432
Pastalikek65 wants to merge 1 commit into
caarlos0:mainfrom
Pastalikek65:docs-empty-env-fallback

Conversation

@Pastalikek65

Copy link
Copy Markdown

Fixes #428.

envDefault is documented as "sets the default value for the field", but a
variable set to an empty value also gets the default (behavior introduced in
#248, v7.0.0).

Adds:

  • a note in the Caveats section
  • a pointer on the envDefault bullet
  • a runnable example, covered by go test and shown on pkg.go.dev

No behavior changes.

@Pastalikek65

Copy link
Copy Markdown
Author

Friendly bump — the docs fix is ready for review; CI is waiting on workflow approval for first-time contributors. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant