13 Commits

Author SHA1 Message Date
9ff1fdc5ee fix!: SetEnvPrefix now re-reads env vars with prefix stripping
SetEnvPrefix was broken: it set the prefix string but never re-read
environment variables. This meant collapse() and SetDefault() couldn't
match prefixed env vars to their unprefixed config keys, so defaults
always won over env vars.

The fix makes SetEnvPrefix behave identically to WithEnvPrefix: it
re-reads os.Environ(), strips the prefix from matching keys, and
stores the stripped keys in envConfig. The envPrefix field is removed
entirely since keys are always pre-stripped.

BREAKING CHANGE: SetEnvPrefix now filters env vars to only those
matching the prefix (previously all env vars were accessible).
This matches the documented and expected behavior.
2026-03-01 20:42:30 +00:00
c4c05732f5 update to fixup some race conditions 2026-01-24 20:29:43 -05:00
59b8a9078f fix config => jety 2023-11-03 17:22:02 -07:00
64d37d936f add check for empty config file 2023-11-03 04:40:53 -07:00
9c5923bd4e fix mutex 2023-11-03 03:42:21 -07:00
5643d4d262 send back custom error 2023-11-03 03:18:37 -07:00
ee74c94359 add config collapse after reading in 2023-11-03 03:01:51 -07:00
ac7820de64 use flattened config instead of lowercased 2023-11-03 01:52:37 -07:00
0c9b84b049 typo 2023-11-03 01:30:45 -07:00
610b979966 optimistic writeback and pessimistic read 2023-11-03 00:56:56 -07:00
0fc1bf396d add withEnvPrefix 2023-11-02 22:45:16 -07:00
c7e8bbf52c type block, remove ae param 2023-11-02 22:41:00 -07:00
58d195f1eb refactor to getters and jety 2023-11-02 22:39:15 -07:00