Documentation
¶
Index ¶
- func Description(appName string, opts config.Options) string
- func KeyRemappingHook(aliasToPathMap map[string]string, defaultsMap map[string]string) mapstructure.DecodeHookFunc
- func Merge(globalSettings map[string]any, c *cobra.Command) map[string]any
- func SetupConfig(configFile string, appName string, opts config.Options)
- func SyncMandatoryFlags(c *cobra.Command, T reflect.Type, vip *viper.Viper, structPath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Description ¶
Description creates a description based on the search paths
func KeyRemappingHook ¶
func KeyRemappingHook(aliasToPathMap map[string]string, defaultsMap map[string]string) mapstructure.DecodeHookFunc
KeyRemappingHook allows config keys to match either a field's name or its `flag` tag.
It correctly handles flattened keys that point to nested struct fields.
func Merge ¶
Merge creates a configuration map for a specific command.
It merges the top-level settings with command-specific settings (which can be nested) from the global configuration.
func SetupConfig ¶
SetupConfig handles the viper initialization
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.