Versions in this module Expand all Collapse all v0 v0.9.1 Jun 25, 2025 v0.9.0 Jun 22, 2025 Changes in this version + func Define(c *cobra.Command, o Options, defineOpts ...DefineOption) error + func EnvPrefix() string + func GetOrSetAppName(name, cName string) string + func GetViper(c *cobra.Command) *viper.Viper + func IsDebugActive(c *cobra.Command) bool + func Reset() + func SetEnvPrefix(str string) + func SetupConfig(rootC *cobra.Command, cfgOpts config.Options) error + func SetupDebug(rootC *cobra.Command, debugOpts debug.Options) error + func SetupUsage(c *cobra.Command) + func Unmarshal(c *cobra.Command, opts Options, hooks ...mapstructure.DecodeHookFunc) error + func UseConfig(readWhen func() bool) (inUse bool, mes string, err error) + func UseConfigSimple(c *cobra.Command) (inUse bool, message string, err error) + func UseDebug(c *cobra.Command, w io.Writer) + type ContextOptions interface + Context func(context.Context) context.Context + FromContext func(context.Context) error + type DefineOption func(*defineContext) + func WithExclusions(exclusions ...string) DefineOption + type Options interface + Attach func(*cobra.Command) error + type TransformableOptions interface + Transform func(context.Context) error + type ValidatableOptions interface + Validate func(context.Context) []error