Files
gf/os/gcfg
Jack Ling 1ab0b18115 feat(os/gcfg): add GetEffective method with standard config priority (#4673)
## 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>
2026-02-26 09:45:56 +08:00
..