envflag

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args

func Args() []string

Args is a call-through to flag.Args().

func Bool

func Bool(flag EnvFlag, value bool) *bool

func BoolArray

func BoolArray(flag EnvFlag, value []bool) *[]bool

func BoolArrayVar

func BoolArrayVar(ptr *[]bool, flag EnvFlag, value []bool)

func BoolVar

func BoolVar(ptr *bool, flag EnvFlag, value bool)

func CommandLine

func CommandLine() *flags.FlagSet

CommandLine returns the flag global flag.CommandLine.

func Defaults

func Defaults() string

Defaults returns the formatted application flag argument defaults.

func Duration

func Duration(flag EnvFlag, value time.Duration) *time.Duration

func DurationArray

func DurationArray(flag EnvFlag, value []time.Duration) *[]time.Duration

func DurationArrayVar

func DurationArrayVar(ptr *[]time.Duration, flag EnvFlag, value []time.Duration)

func DurationVar

func DurationVar(ptr *time.Duration, flag EnvFlag, value time.Duration)

func Float

func Float(flag EnvFlag, value float64) *float64

func FloatArray

func FloatArray(flag EnvFlag, value []float64) *[]float64

func FloatArrayVar

func FloatArrayVar(ptr *[]float64, flag EnvFlag, value []float64)

func FloatVar

func FloatVar(ptr *float64, flag EnvFlag, value float64)

func Int

func Int(flag EnvFlag, value int) *int

func Int64

func Int64(flag EnvFlag, value int64) *int64

func Int64Array

func Int64Array(flag EnvFlag, value []int64) *[]int64

func Int64ArrayVar

func Int64ArrayVar(ptr *[]int64, flag EnvFlag, value []int64)

func Int64Var

func Int64Var(ptr *int64, flag EnvFlag, value int64)

func IntArray

func IntArray(flag EnvFlag, value []int) *[]int

func IntArrayVar

func IntArrayVar(ptr *[]int, flag EnvFlag, value []int)

func IntVar

func IntVar(ptr *int, flag EnvFlag, value int)

func Parse

func Parse()

Parse is a call-through to flag.Parse().

func Parsed

func Parsed() bool

Parsed is a call-through to flag.Parsed().

func PrintDefaults

func PrintDefaults()

PrintDefaults prints formatted application flag argument defaults.

func Set

func Set(name string, value string) error

Set is a call-through to flag.Set().

func Size

func Size(flag EnvFlag, value bytesize.Size) *bytesize.Size

func SizeArray

func SizeArray(flag EnvFlag, value []bytesize.Size) *[]bytesize.Size

func SizeArrayVar

func SizeArrayVar(ptr *[]bytesize.Size, flag EnvFlag, value []bytesize.Size)

func SizeVar

func SizeVar(ptr *bytesize.Size, flag EnvFlag, value bytesize.Size)

func String

func String(flag EnvFlag, value string) *string

func StringArray

func StringArray(flag EnvFlag, value []string) *[]string

func StringArrayVar

func StringArrayVar(ptr *[]string, flag EnvFlag, value []string)

func StringVar

func StringVar(ptr *string, flag EnvFlag, value string)

func Time

func Time(flag EnvFlag, value time.Time) *time.Time

func TimeArray

func TimeArray(flag EnvFlag, value []time.Time) *[]time.Time

func TimeArrayVar

func TimeArrayVar(ptr *[]time.Time, flag EnvFlag, value []time.Time)

func TimeVar

func TimeVar(ptr *time.Time, flag EnvFlag, value time.Time)

func Uint

func Uint(flag EnvFlag, value uint) *uint

func Uint64

func Uint64(flag EnvFlag, value uint64) *uint64

func Uint64Array

func Uint64Array(flag EnvFlag, value []uint64) *[]uint64

func Uint64ArrayVar

func Uint64ArrayVar(ptr *[]uint64, flag EnvFlag, value []uint64)

func Uint64Var

func Uint64Var(ptr *uint64, flag EnvFlag, value uint64)

func UintArray

func UintArray(flag EnvFlag, value []uint) *[]uint

func UintArrayVar

func UintArrayVar(ptr *[]uint, flag EnvFlag, value []uint)

func UintVar

func UintVar(ptr *uint, flag EnvFlag, value uint)

Types

type EnvFlag

type EnvFlag struct {
	Env   string
	Flag  string
	Usage string
}

Jump to

Keyboard shortcuts

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