Closed denisushakov closed 1 week ago
The changes in this pull request involve substantial modifications to the configuration management of a command-line application. Key updates include the restructuring of configuration loading and merging logic in cmd/root.go
, the introduction of a new default.json
file, and the simplification of existing configuration types in pkg/config/config.go
. Additionally, new types and constants related to configuration operations are defined in pkg/config/type.go
. The overall aim is to enhance clarity and efficiency in handling configuration settings.
File | Change Summary |
---|---|
cmd/root.go | - Removed call to cobra.OnInitialize(initConfig) . - Added runMain , initDefaultConfig , and mergeConfigs functions. - Updated error handling for configuration loading. - Changed config path in initConfig . |
configs/config.json | - Replaced xml_files array with xml_file_changes array. - Simplified operations on XML elements, focusing on adding ObjectBelonging . |
configs/default.json | - Introduced new configuration file specifying platform_version and xml_file_changes with operations on Configuration.xml . |
pkg/config/config.go | - Removed several type definitions and constants. - Updated LoadConfig function signature to use global viper instance. - Enhanced NormalizePath function. |
pkg/config/type.go | - Added new types and constants related to configuration management, including ConvertType , OperationType , ElementOperation , FileOperation , Configuration , and DumpInfo . |
In the burrow deep, where the configs lay,
A rabbit hops in, to brighten the day.
With new paths and merges, oh what a delight,
Simplified changes make everything right!
So gather 'round, friends, let’s cheer and rejoice,
For clearer configs, we all have a voice! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
and refact part where this config upload
Summary by CodeRabbit
Release Notes
New Features
default.json
) specifying platform version and XML file changes.Bug Fixes
Refactor
Documentation