Skip to content

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

Merged
caarlos0 merged 1 commit into
caarlos0:mainfrom
Pastalikek65:docs-empty-env-fallback
Sep 4, 2026
Merged

caarlos0 merged 1 commit into
caarlos0:mainfrom
Pastalikek65:docs-empty-env-fallback

Conversation

@Pastalikek65

Copy link
Copy Markdown
Contributor

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
Contributor Author

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

@caarlos0
caarlos0 merged commit a2a709a into caarlos0:main Sep 4, 2026
@caarlos0

caarlos0 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

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.

2 participants