README

CI PkgGoDev

flags

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureAlterableFlags

func EnsureAlterableFlags(cmd *cobra.Command, name ...string)

Checks for alternetable flags. One of the provided flags must needs to be set.

func EnsureRequiredFlags

func EnsureRequiredFlags(cmd *cobra.Command, name ...string)

Checks if a flag value in a command has been provided by the user Or not. The ordering of the flags can be set for nested flags.

func PrintFlags

func PrintFlags(fs *pflag.FlagSet, list ...string)

Types

type Options

type Options struct {
	ToStderr        bool   // The -logtostderr flag.
	AlsoToStderr    bool   // The -alsologtostderr flag.
	StderrThreshold string // The -stderrthreshold flag.
	Verbosity       string // V logging level, the value of the -v flag/
}
var (
	LoggerOptions Options
)

func GetOptions

func GetOptions(fs *pflag.FlagSet) Options

func (Options) ToFlags

func (opt Options) ToFlags() []string

Source Files