Documentation ¶
Overview ¶
Package option provides utilities of option handling
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultStringValue = "__DEFAULT_STRING_VALUE__"
Functions ¶
func RegisterBoolFlag ¶
RegisterBoolFlag register bool flag to provided cmd and viper
func RegisterStringFlag ¶
func RegisterStringFlag(cmd *cobra.Command, flagConfig *StringFlag) error
RegisterStringFlag register string flag to provided cmd and viper
Types ¶
type CmdRawConfig ¶
type CmdRawConfig struct {
CmdConfig `mapstructure:",squash"`
}
type Flag ¶
type Flag struct { IsPersistent bool IsRequired bool Shorthand string Name string Usage string ViperName string }
Flag represents flag which can be specified
type RebuildWithCmdConfig ¶
type RebuildWithCmdConfig struct {
Port string
}
func NewRebuildWithCmdConfigFromViper ¶
func NewRebuildWithCmdConfigFromViper() (*RebuildWithCmdConfig, error)
Click to show internal directories.
Click to hide internal directories.