-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
The github.com/platform-mesh/golang-commons/config package has breaking changes that require updates to this repository.
Breaking Changes
NewDefaultConfig()signature changed - no longer returns viper or errorBindConfigToFlags()removed - useAddFlags()method instead- Environment variables no longer supported as substitutes for flags
Changes Required
Update cmd/root.go to use the new config API:
Before:
v, defaultCfg, err := config.NewDefaultConfig(rootCmd)
if err != nil { ... }
err = config.BindConfigToFlags(v, operatorCmd, &operatorCfg)After:
defaultCfg := config.NewDefaultConfig()
defaultCfg.AddFlags(cmd.Flags())Service-specific configuration should be migrated to the same pattern with NewX() constructor and AddFlags() method.
Files to Update
cmd/root.go
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status