flags

package
v0.0.0-...-6f3fb99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedFlagSets

type NamedFlagSets struct {
	// Order is an ordered list of flag set names.
	Order []string
	// FlagSets stores the flag sets by name.
	FlagSets map[string]*pflag.FlagSet
}

NamedFlagSets stores named flag sets in the order of calling FlagSet.

func (*NamedFlagSets) AddToCobraCommand

func (nfs *NamedFlagSets) AddToCobraCommand(cmd *cobra.Command)

func (*NamedFlagSets) BindEnvsForViper

func (nfs *NamedFlagSets) BindEnvsForViper(prefix string) error

func (*NamedFlagSets) FlagSet

func (nfs *NamedFlagSets) FlagSet(name string) *pflag.FlagSet

FlagSet returns the flag set with the given name and adds it to the ordered name list if it is not in there yet.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL