Commit c3a384e
refactor(config): replace manual viper mapping with Unmarshal
- Replace 84 manual viper.GetX() calls with viper.Unmarshal() using yaml struct tags
- Remove 116-line defaultConf YAML blob, consolidate all defaults into setDefaults()
- Use viper.New() instead of global singleton to prevent test pollution
- Extract shared test assertions into assertCommonConfig helper
- Remove tests that referenced deleted defaultConf variable
- Fix Huawei test that relied on placeholder default values
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f193151 commit c3a384e
4 files changed
Lines changed: 224 additions & 480 deletions
0 commit comments