Skip to content

Commit 05d41f6

Browse files
appleboyclaude
andauthored
refactor(config): replace manual viper mapping with Unmarshal (#870)
* 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> * style(config): merge duplicate Android default blocks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(config): fail fast on config parse errors and fix misleading comment - Fix misleading comment about config file search behavior - Return error on config parse/permission failures instead of silently falling back to defaults; only ignore ConfigFileNotFoundError Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f193151 commit 05d41f6

File tree

4 files changed

+228
-481
lines changed

4 files changed

+228
-481
lines changed

0 commit comments

Comments
 (0)