flagx

package
v0.0.674 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustGetBool

func MustGetBool(cmd *cobra.Command, name string) bool

MustGetBool returns a bool flag or fatals if an error occurs.

func MustGetDuration added in v0.0.6

func MustGetDuration(cmd *cobra.Command, name string) time.Duration

MustGetDuration returns a time.Duration flag or fatals if an error occurs.

func MustGetInt added in v0.0.16

func MustGetInt(cmd *cobra.Command, name string) int

MustGetInt returns a int flag or fatals if an error occurs.

func MustGetString

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

MustGetString returns a string flag or fatals if an error occurs.

func MustGetStringArray added in v0.0.361

func MustGetStringArray(cmd *cobra.Command, name string) []string

MustGetStringArray returns a []string flag or fatals if an error occurs.

func MustGetStringSlice added in v0.0.9

func MustGetStringSlice(cmd *cobra.Command, name string) []string

MustGetStringSlice returns a []string flag or fatals if an error occurs.

func MustGetStringToStringMap added in v0.0.377

func MustGetStringToStringMap(cmd *cobra.Command, name string) map[string]string

MustGetStringToStringMap returns a map[string]string flag or fatals if an error occurs.

func MustGetUint32 added in v0.0.162

func MustGetUint32(cmd *cobra.Command, name string) uint32

MustGetUint32 returns a uint32 flag or fatals if an error occurs.

func MustGetUint8 added in v0.0.162

func MustGetUint8(cmd *cobra.Command, name string) uint8

MustGetUint8 returns a uint8 flag or fatals if an error occurs.

func NewFlagSet added in v0.0.170

func NewFlagSet(name string) *pflag.FlagSet

Types

This section is empty.

Jump to

Keyboard shortcuts

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