mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
## Summary - Add `GetEffective` and `MustGetEffective` methods following 12-Factor App config priority - Priority: Command line > Environment variables > Config file > Default value - Add clarifying notes to existing `GetWithEnv`/`GetWithCmd` methods - Add comprehensive unit tests ## Test plan - [x] All gcfg unit tests pass (44 tests) - [x] New `Test_GetEffective` covers 6 scenarios: - Config file only - Env overrides config - Cmd overrides env - Default value fallback - Empty string override (industry standard) - Key only in env Closes #4650 --------- Co-authored-by: John Guo <claymore1986@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>