Skip to content

feat: Add support for fallback keys#14

Merged
engvik merged 2 commits into
mainfrom
engvik/fallback-keys
Jun 19, 2026
Merged

feat: Add support for fallback keys#14
engvik merged 2 commits into
mainfrom
engvik/fallback-keys

Conversation

@engvik

@engvik engvik commented Jun 19, 2026

Copy link
Copy Markdown
Member

Envconfig now take a comma-separated list of environment variable names, where the first key is the primary key and if absent each subsequent key is tried in order until a non-empty value is found.

This is useful for migrating environment variables.

Comment thread testdata/default_table.txt
Comment thread envconfig_test.go
Comment thread envconfig_test.go Outdated
@engvik engvik force-pushed the engvik/fallback-keys branch from 4c5b135 to 69329c4 Compare June 19, 2026 09:34
@engvik engvik requested a review from GregorioDiStefano June 19, 2026 09:34
engvik added 2 commits June 19, 2026 11:35
Envconfig now take a comma-separated list of environment variable names,
where the first key is the primary key and if absent each subsequent key
is tried in order until a non-empty value is found.

This is useful for migrating environment variables.
Let's bump the test matrix to try the three latest major versions.
@engvik engvik force-pushed the engvik/fallback-keys branch from 69329c4 to 24ddeee Compare June 19, 2026 09:36
@engvik engvik merged commit 30a57ac into main Jun 19, 2026
6 checks passed
@engvik engvik deleted the engvik/fallback-keys branch June 19, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants