flags

package module
Version: v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 8

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL