Documentation
¶
Index ¶
- type Scope
- func (s *Scope) AddDefinedFlag(name, fieldPath string) error
- func (s *Scope) GetBoundEnvs() map[string]bool
- func (s *Scope) GetCustomDecodeHook(hookName string) (hookFunc mapstructure.DecodeHookFunc, ok bool)
- func (s *Scope) IsEnvBound(flagName string) bool
- func (s *Scope) SetBound(flagName string)
- func (s *Scope) SetCustomDecodeHook(hookName string, hookFunc mapstructure.DecodeHookFunc)
- func (s *Scope) Viper() *spf13viper.Viper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope holds per-command state for structcli
func (*Scope) AddDefinedFlag ¶
AddDefinedFlag adds a flag to the set of defined flags for this scope, returning an error if it's a duplicate.
func (*Scope) GetBoundEnvs ¶
GetBoundEnvs is for testing purposes only
func (*Scope) GetCustomDecodeHook ¶
func (*Scope) IsEnvBound ¶
IsEnvBound checks if an environment variable is already bound for this command
func (*Scope) SetCustomDecodeHook ¶
func (*Scope) Viper ¶
func (s *Scope) Viper() *spf13viper.Viper
Viper returns the viper instance for the command
Click to show internal directories.
Click to hide internal directories.