Documentation ¶
Index ¶
- Constants
- func DefaultUsageFunc(sf *pflag.FlagSet, c *cobra.Command) string
- func GradientBanner(banner string) string
- func InitLogging()
- func NewViper(prefix string) *viper.Viper
- func PopulateFlagSet(obj interface{}, flagSet *pflag.FlagSet, vpr *viper.Viper, opts ...FlagOption) *pflag.FlagSet
- func StartAgent(_ *config.Agent) error
- func Unmarshal(vpr *viper.Viper, cfg interface{}) error
- type CmdRunFn
- type FlagOption
- type Server
Constants ¶
View Source
const OptionsEnd = "--"
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
Variables ¶
This section is empty.
Functions ¶
func DefaultUsageFunc ¶
TODO: Do we want to keep this or use cobra default one? Maybe banner + cobra default? Or something else? This is mostly copied from ffcli package
func GradientBanner ¶ added in v0.0.40
func InitLogging ¶ added in v0.0.40
func InitLogging()
func PopulateFlagSet ¶ added in v0.0.21
func StartAgent ¶ added in v0.0.38
Types ¶
type FlagOption ¶ added in v0.0.34
type FlagOption func(*options)
func WithReplacement ¶ added in v0.0.34
func WithReplacement(k, v string) FlagOption
func WithSkip ¶ added in v0.0.34
func WithSkip(n ...string) FlagOption
func WithSkipDeprecated ¶ added in v0.0.34
func WithSkipDeprecated(ok bool) FlagOption
WithSkipDeprecated specifies that fields marked as deprecated won't be parsed. By default PopulateFlagSet parses them but not shows in Usage; setting this option to true causes PopulateFlagSet to skip parsing.
Click to show internal directories.
Click to hide internal directories.