flag

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Overview

flag defines some special flags for micro-service tools such as Prometheus, Zipkin, OpenTracer...

Most of functions and basic structure are reexported from https://github.com/spf13/pflag, which means you do not need to learn a new flag package and all of usages of this package are the same as pflag.

This package does not provide any parse method for FlagSet, because it should be used with boot.Command

Copyright 2020 The micro-boot Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandling

type ErrorHandling int

ErrorHandling defines how to handle flag parsing errors.

const (
	// ContinueOnError will return an err from Parse() if an error is found
	ContinueOnError ErrorHandling = iota
	// ExitOnError will call os.Exit(2) if an error is found when parsing
	ExitOnError
	// PanicOnError will panic() if an error is found when parsing flags
	PanicOnError
)

type FlagSet

type FlagSet struct {
	// contains filtered or unexported fields
}

func NewFlagSet

func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet

NewFlagSet returns a FlagSet instance

func (*FlagSet) AddFlagSet

func (f *FlagSet) AddFlagSet(newSet *FlagSet)

AddFlagSet is the reexport of pflag.AddFlagSet

AddFlagSet adds one FlagSet to another. If a flag is already present in f the flag from newSet will be ignored.

func (*FlagSet) AddGoFlag

func (f *FlagSet) AddGoFlag(goflag *goflag.Flag)

AddGoFlag is the reexport of pflag.FlagSet.AddGoFlag()

AddGoFlag will add the given *flag.Flag to the pflag.FlagSet

func (*FlagSet) AddGoFlagSet

func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet)

AddGoFlagSet is the reexport of pflag.FlagSet.AddGoFlagSet()

AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet

func (*FlagSet) Args

func (f *FlagSet) Args() []string

func (*FlagSet) Bool

func (f *FlagSet) Bool(name string, value bool, usage string) *bool

Bool is the reexport of pflag.FlagSet.Bool()

Bool defines a bool flag with specified name, default value, and usage string. The return value is the address of a bool variable that stores the value of the flag.

func (*FlagSet) BoolP

func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool

BoolP is the reexport of pflag.FlagSet.BoolP()

BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BoolSlice

func (f *FlagSet) BoolSlice(name string, value []bool, usage string) *[]bool

BoolSlice is the reexport of pflag.FlagSet.BoolSlice()

BoolSlice defines a []bool flag with specified name, default value, and usage string. The return value is the address of a []bool variable that stores the value of the flag.

func (*FlagSet) BoolSliceP

func (f *FlagSet) BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool

BoolSliceP is the reexport of pflag.FlagSet.BoolSliceP()

BoolSliceP is like BoolSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BoolSliceVar

func (f *FlagSet) BoolSliceVar(p *[]bool, name string, value []bool, usage string)

BoolSliceVar is the reexport of pflag.FlagSet.BoolSliceVar()

BoolSliceVar defines a boolSlice flag with specified name, default value, and usage string. The argument p points to a []bool variable in which to store the value of the flag.

func (*FlagSet) BoolSliceVarP

func (f *FlagSet) BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string)

BoolSliceVarP is the reexport of pflag.FlagSet.BoolSliceVarP()

BoolSliceVarP is like BoolSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BoolVar

func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string)

BoolVar is the reexport of pflag.FlagSet.BoolVar()

BoolVar defines a bool flag with specified name, default value, and usage string. The argument p points to a bool variable in which to store the value of the flag.

func (*FlagSet) BoolVarP

func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string)

BoolVarP is the reexport of pflag.FlagSet.BoolVarP()

BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BytesBase64Var

func (f *FlagSet) BytesBase64Var(p *[]byte, name string, value []byte, usage string)

BytesBase64Var is the reexport of pflag.FlagSet.BytesBase64Var()

BytesBase64Var defines an []byte flag with specified name, default value, and usage string. The argument p points to an []byte variable in which to store the value of the flag.

func (*FlagSet) BytesBase64VarP

func (f *FlagSet) BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string)

BytesBase64VarP is the reexport of pflag.FlagSet.BytesBase64VarP()

BytesBase64VarP is like BytesBase64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BytesHex

func (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte

BytesHex is the reexport of pflag.FlagSet.BytesHex()

BytesHex defines an []byte flag with specified name, default value, and usage string. The return value is the address of an []byte variable that stores the value of the flag.

func (*FlagSet) BytesHexP

func (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte

BytesHexP is the reexport of pflag.FlagSet.BytesHexP()

BytesHexP is like BytesHex, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) BytesHexVar

func (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string)

BytesHexVar is the reexport of pflag.FlagSet.BytesHexVar()

BytesHexVar defines an []byte flag with specified name, default value, and usage string. The argument p points to an []byte variable in which to store the value of the flag.

func (*FlagSet) BytesHexVarP

func (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string)

BytesHexVarP is the reexport of pflag.FlagSet.BytesHexVarP()

BytesHexVarP is like BytesHexVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Count

func (f *FlagSet) Count(name string, usage string) *int

Count is the reexport of pflag.FlagSet.Count()

Count defines a count flag with specified name, default value, and usage string. The return value is the address of an int variable that stores the value of the flag. A count flag will add 1 to its value every time it is found on the command line

func (*FlagSet) CountP

func (f *FlagSet) CountP(name, shorthand string, usage string) *int

CountP is the reexport of pflag.FlagSet.CountP()

CountP is like Count only takes a shorthand for the flag name.

func (*FlagSet) CountVar

func (f *FlagSet) CountVar(p *int, name string, usage string)

CountVar is the reexport of pflag.FlagSet.CountVar()

CountVar defines a count flag with specified name, default value, and usage string. The argument p points to an int variable in which to store the value of the flag. A count flag will add 1 to its value every time it is found on the command line

func (*FlagSet) CountVarP

func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string)

CountVarP is the reexport of pflag.FlagSet.CountVarP()

CountVarP is like CountVar only take a shorthand for the flag name.

func (*FlagSet) Duration

func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration

Duration is the reexport of pflag.FlagSet.Duration()

Duration defines a time.Duration flag with specified name, default value, and usage string. The return value is the address of a time.Duration variable that stores the value of the flag.

func (*FlagSet) DurationP

func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration

DurationP is the reexport of pflag.FlagSet.DurationP()

DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) DurationSlice

func (f *FlagSet) DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration

DurationSlice is the reexport of pflag.FlagSet.DurationSlice()

DurationSlice defines a []time.Duration flag with specified name, default value, and usage string. The return value is the address of a []time.Duration variable that stores the value of the flag.

func (*FlagSet) DurationSliceP

func (f *FlagSet) DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration

DurationSliceP is the reexport of pflag.FlagSet.DurationSliceP()

DurationSliceP is like DurationSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) DurationSliceVar

func (f *FlagSet) DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string)

DurationSliceVar is the reexport of pflag.FlagSet.DurationSliceVar()

DurationSliceVar defines a durationSlice flag with specified name, default value, and usage string. The argument p points to a []time.Duration variable in which to store the value of the flag.

func (*FlagSet) DurationSliceVarP

func (f *FlagSet) DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, usage string)

DurationSliceVarP is the reexport of pflag.FlagSet.DurationSliceVarP()

DurationSliceVarP is like DurationSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) DurationVar

func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string)

DurationVar is the reexport of pflag.FlagSet.DurationVar()

DurationVar defines a time.Duration flag with specified name, default value, and usage string. The argument p points to a time.Duration variable in which to store the value of the flag.

func (*FlagSet) DurationVarP

func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string)

DurationVarP is the reexport of pflag.FlagSet.DurationVarP()

DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float32

func (f *FlagSet) Float32(name string, value float32, usage string) *float32

Float32 is the reexport of pflag.FlagSet.Float32()

Float32 defines a float32 flag with specified name, default value, and usage string. The return value is the address of a float32 variable that stores the value of the flag.

func (*FlagSet) Float32P

func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32

Float32P is the reexport of pflag.FlagSet.Float32P()

Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float32Slice

func (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32

Float32Slice is the reexport of pflag.FlagSet.Float32Slice()

Float32Slice defines a []float32 flag with specified name, default value, and usage string. The return value is the address of a []float32 variable that stores the value of the flag.

func (*FlagSet) Float32SliceP

func (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32

Float32SliceP is the reexport of pflag.FlagSet.Float32SliceP()

Float32SliceP is like Float32Slice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float32SliceVar

func (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string)

Float32SliceVar is the reexport of pflag.FlagSet.Float32SliceVar()

Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string. The argument p points to a []float32 variable in which to store the value of the flag.

func (*FlagSet) Float32SliceVarP

func (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string)

Float32SliceVarP is the reexport of pflag.FlagSet.Float32SliceVarP()

Float32SliceVarP is like Float32SliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float32Var

func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string)

Float32Var is the reexport of pflag.FlagSet.Float32Var()

Float32Var defines a float32 flag with specified name, default value, and usage string. The argument p points to a float32 variable in which to store the value of the flag.

func (*FlagSet) Float32VarP

func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string)

Float32VarP is the reexport of pflag.FlagSet.Float32VarP()

Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64

func (f *FlagSet) Float64(name string, value float64, usage string) *float64

Float64 is the reexport of pflag.FlagSet.Float64()

Float64 defines a float64 flag with specified name, default value, and usage string. The return value is the address of a float64 variable that stores the value of the flag.

func (*FlagSet) Float64P

func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64

Float64P is the reexport of pflag.FlagSet.Float64P()

Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64Slice

func (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64

Float64Slice is the reexport of pflag.FlagSet.Float64Slice()

Float64Slice defines a []float64 flag with specified name, default value, and usage string. The return value is the address of a []float64 variable that stores the value of the flag.

func (*FlagSet) Float64SliceP

func (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64

Float64SliceP is the reexport of pflag.FlagSet.Float64SliceP()

Float64SliceP is like Float64Slice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64SliceVar

func (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string)

Float64SliceVar is the reexport of pflag.FlagSet.Float64SliceVar()

Float64SliceVar defines a float64Slice flag with specified name, default value, and usage string. The argument p points to a []float64 variable in which to store the value of the flag.

func (*FlagSet) Float64SliceVarP

func (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string)

Float64SliceVarP is the reexport of pflag.FlagSet.Float64SliceVarP()

Float64SliceVarP is like Float64SliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64ToFloat64

func (f *FlagSet) Float64ToFloat64(name string, value map[float64]float64, usage string) *map[float64]float64

Float64ToFloat64 defines a string flag with specified name, default value, and usage string. The return value is the address of a map[float64]float64 variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) Float64ToFloat64P

func (f *FlagSet) Float64ToFloat64P(name, shorthand string, value map[float64]float64, usage string) *map[float64]float64

Float64ToFloat64P is like Float64ToFloat64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64ToFloat64Var

func (f *FlagSet) Float64ToFloat64Var(p *map[float64]float64, name string, value map[float64]float64, usage string)

Float64ToFloat64Var defines a string flag with specified name, default value, and usage string. The argument p points to a map[float64]float64 variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) Float64ToFloat64VarP

func (f *FlagSet) Float64ToFloat64VarP(p *map[float64]float64, name, shorthand string, value map[float64]float64, usage string)

Float64ToFloat64VarP is like Float64ToFloat64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Float64Var

func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string)

Float64Var is the reexport of pflag.FlagSet.Float64Var()

Float64Var defines a float64 flag with specified name, default value, and usage string. The argument p points to a float64 variable in which to store the value of the flag.

func (*FlagSet) Float64VarP

func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string)

Float64VarP is the reexport of pflag.FlagSet.Float64VarP()

Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) GetBool

func (f *FlagSet) GetBool(name string) (bool, error)

GetBool is the reexport of pflag.FlagSet.GetBool()

GetBool return the bool value of a flag with the given name

func (*FlagSet) GetBoolSlice

func (f *FlagSet) GetBoolSlice(name string) ([]bool, error)

GetBoolSlice is the reexport of pflag.FlagSet.GetBoolSlice()

GetBoolSlice returns the []bool value of a flag with the given name.

func (*FlagSet) GetBytesBase64

func (f *FlagSet) GetBytesBase64(name string) ([]byte, error)

GetBytesBase64 is the reexport of pflag.FlagSet.GetBytesBase64()

GetBytesBase64 return the []byte value of a flag with the given name

func (*FlagSet) GetBytesHex

func (f *FlagSet) GetBytesHex(name string) ([]byte, error)

GetBytesHex is the reexport of pflag.FlagSet.GetBytesHex()

GetBytesHex return the []byte value of a flag with the given name

func (*FlagSet) GetCount

func (f *FlagSet) GetCount(name string) (int, error)

GetCount is the reexport of pflag.FlagSet.GetCount()

GetCount return the int value of a flag with the given name

func (*FlagSet) GetDuration

func (f *FlagSet) GetDuration(name string) (time.Duration, error)

GetDuration is the reexport of pflag.FlagSet.GetDuration()

GetDuration return the duration value of a flag with the given name

func (*FlagSet) GetDurationSlice

func (f *FlagSet) GetDurationSlice(name string) ([]time.Duration, error)

GetDurationSlice is the reexport of pflag.FlagSet.GetDurationSlice()

GetDurationSlice returns the []time.Duration value of a flag with the given name

func (*FlagSet) GetFlagSet

func (f *FlagSet) GetFlagSet() *pflag.FlagSet

GetFlagSet returns the internal plag.FlagSet of FlagSet

func (*FlagSet) GetFloat32

func (f *FlagSet) GetFloat32(name string) (float32, error)

GetFloat32 is the reexport of pflag.FlagSet.GetFloat32()

GetFloat32 return the float32 value of a flag with the given name

func (*FlagSet) GetFloat32Slice

func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error)

GetFloat32Slice is the reexport of pflag.FlagSet.GetFloat32Slice()

GetFloat32Slice return the []float32 value of a flag with the given name

func (*FlagSet) GetFloat64

func (f *FlagSet) GetFloat64(name string) (float64, error)

GetFloat64 is the reexport of pflag.FlagSet.GetFloat64()

GetFloat64 return the float64 value of a flag with the given name

func (*FlagSet) GetFloat64Slice

func (f *FlagSet) GetFloat64Slice(name string) ([]float64, error)

GetFloat64Slice is the reexport of pflag.FlagSet.GetFloat64Slice()

GetFloat64Slice return the []float64 value of a flag with the given name

func (*FlagSet) GetFloat64ToFloat64

func (f *FlagSet) GetFloat64ToFloat64(name string) (map[float64]float64, error)

GetFloat64ToFloat64 return the map[float64]float64 value of a flag with the given name

func (*FlagSet) GetIP

func (f *FlagSet) GetIP(name string) (net.IP, error)

GetIP is the reexport of pflag.FlagSet.GetIP()

GetIP return the net.IP value of a flag with the given name

func (*FlagSet) GetIPNet

func (f *FlagSet) GetIPNet(name string) (net.IPNet, error)

GetIPNet is the reexport of pflag.FlagSet.GetIPNet()

GetIPNet return the net.IPNet value of a flag with the given name

func (*FlagSet) GetIPNetSlice

func (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error)

GetIPNetSlice is the reexport of pflag.FlagSet.GetIPNetSlice()

GetIPNetSlice returns the []net.IPNet value of a flag with the given name

func (*FlagSet) GetIPSlice

func (f *FlagSet) GetIPSlice(name string) ([]net.IP, error)

GetIPSlice is the reexport of pflag.FlagSet.GetIPSlice()

GetIPSlice returns the []net.IP value of a flag with the given name

func (*FlagSet) GetIPv4Mask

func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error)

GetIPv4Mask is the reexport of pflag.FlagSet.GetIPv4Mask()

GetIPv4Mask return the net.IPv4Mask value of a flag with the given name

func (*FlagSet) GetIPv4PortInt

func (f *FlagSet) GetIPv4PortInt(name string) (int, error)

GetIPv4PortInt return the uint value of a flag with the given name

func (*FlagSet) GetIPv4PortString

func (f *FlagSet) GetIPv4PortString(name string) (string, error)

GetIPv4PortString return the uint value of a flag with the given name

func (*FlagSet) GetIPv4PortUint

func (f *FlagSet) GetIPv4PortUint(name string) (uint, error)

GetIPv4PortUint return the uint value of a flag with the given name

func (*FlagSet) GetInt

func (f *FlagSet) GetInt(name string) (int, error)

GetInt is the reexport of pflag.FlagSet.GetInt()

GetInt return the int value of a flag with the given name

func (*FlagSet) GetInt16

func (f *FlagSet) GetInt16(name string) (int16, error)

GetInt16 is the reexport of pflag.FlagSet.GetInt16()

GetInt16 return the int8 value of a flag with the given name

func (*FlagSet) GetInt32

func (f *FlagSet) GetInt32(name string) (int32, error)

GetInt32 is the reexport of pflag.FlagSet.GetInt32()

GetInt32 return the int32 value of a flag with the given name

func (*FlagSet) GetInt32Slice

func (f *FlagSet) GetInt32Slice(name string) ([]int32, error)

GetInt32Slice is the reexport of pflag.FlagSet.GetInt32Slice()

GetInt32Slice return the []int32 value of a flag with the given name

func (*FlagSet) GetInt64

func (f *FlagSet) GetInt64(name string) (int64, error)

GetInt64 is the reexport of pflag.FlagSet.GetInt64()

GetInt64 return the int64 value of a flag with the given name

func (*FlagSet) GetInt64Slice

func (f *FlagSet) GetInt64Slice(name string) ([]int64, error)

GetInt64Slice is the reexport of pflag.FlagSet.GetInt64Slice()

GetInt64Slice return the []int64 value of a flag with the given name

func (*FlagSet) GetInt8

func (f *FlagSet) GetInt8(name string) (int8, error)

GetInt8 is the reexport of pflag.FlagSet.GetInt8()

GetInt8 return the int8 value of a flag with the given name

func (*FlagSet) GetIntSlice

func (f *FlagSet) GetIntSlice(name string) ([]int, error)

GetIntSlice is the reexport of pflag.FlagSet.GetIntSlice()

GetIntSlice return the []int value of a flag with the given name

func (*FlagSet) GetMongoReadPreferenceMode

func (f *FlagSet) GetMongoReadPreferenceMode(name string) (readpref.Mode, error)

GetMongoReadPreferenceMode return the readpref.Mode value of a flag with the given name

func (*FlagSet) GetMongoTagSet

func (f *FlagSet) GetMongoTagSet(name string) (tag.Set, error)

GetMongoTagSet return the tag.Set value of a flag with the given name

func (*FlagSet) GetMongoTagSetSlice

func (f *FlagSet) GetMongoTagSetSlice(name string) ([]tag.Set, error)

GetMongoTagSetSlice return the tag.Set value of a flag with the given name

func (*FlagSet) GetPrometheusHandlerErrorHandling

func (f *FlagSet) GetPrometheusHandlerErrorHandling(name string) (promhttp.HandlerErrorHandling, error)

GetPrometheusHandlerErrorHandling return the promhttp.HandlerErrorHandling value of a flag with the given name

func (*FlagSet) GetString

func (f *FlagSet) GetString(name string) (string, error)

GetString is the reexport of pflag.FlagSet.GetString()

GetString return the string value of a flag with the given name

func (*FlagSet) GetStringArray

func (f *FlagSet) GetStringArray(name string) ([]string, error)

GetStringArray is the reexport of pflag.FlagSet.GetStringArray()

GetStringArray return the []string value of a flag with the given name

func (*FlagSet) GetStringSlice

func (f *FlagSet) GetStringSlice(name string) ([]string, error)

GetStringSlice is the reexport of pflag.FlagSet.GetStringSlice()

GetStringSlice return the []string value of a flag with the given name

func (*FlagSet) GetStringToFloat32

func (f *FlagSet) GetStringToFloat32(name string) (map[string]float32, error)

GetStringToFloat32 return the map[string]float32 value of a flag with the given name

func (*FlagSet) GetStringToFloat64

func (f *FlagSet) GetStringToFloat64(name string) (map[string]float64, error)

GetStringToFloat64 return the map[string]float64 value of a flag with the given name

func (*FlagSet) GetStringToInt

func (f *FlagSet) GetStringToInt(name string) (map[string]int, error)

GetStringToInt is the reexport of pflag.FlagSet.GetStringToInt()

GetStringToInt return the map[string]int value of a flag with the given name

func (*FlagSet) GetStringToInt32

func (f *FlagSet) GetStringToInt32(name string) (map[string]int32, error)

GetStringToInt32 return the map[string]int32 value of a flag with the given name

func (*FlagSet) GetStringToInt64

func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error)

GetStringToInt64 is the reexport of pflag.FlagSet.GetStringToInt64()

GetStringToInt64 return the map[string]int64 value of a flag with the given name

func (*FlagSet) GetStringToString

func (f *FlagSet) GetStringToString(name string) (map[string]string, error)

GetStringToString is the reexport of pflag.FlagSet.GetStringToString()

GetStringToString return the map[string]string value of a flag with the given name

func (*FlagSet) GetUint

func (f *FlagSet) GetUint(name string) (uint, error)

GetUint is the reexport of pflag.FlagSet.GetUint()

GetUint return the uint value of a flag with the given name

func (*FlagSet) GetUint16

func (f *FlagSet) GetUint16(name string) (uint16, error)

GetUint16 is the reexport of pflag.FlagSet.GetUint16()

GetUint16 return the uint16 value of a flag with the given name

func (*FlagSet) GetUint32

func (f *FlagSet) GetUint32(name string) (uint32, error)

GetUint32 is the reexport of pflag.FlagSet.GetUint32()

GetUint32 return the uint32 value of a flag with the given name

func (*FlagSet) GetUint64

func (f *FlagSet) GetUint64(name string) (uint64, error)

GetUint64 is the reexport of pflag.FlagSet.GetUint64()

GetUint64 return the uint64 value of a flag with the given name

func (*FlagSet) GetUint8

func (f *FlagSet) GetUint8(name string) (uint8, error)

GetUint8 is the reexport of pflag.FlagSet.GetUint8()

GetUint8 return the uint8 value of a flag with the given name

func (*FlagSet) GetUintSlice

func (f *FlagSet) GetUintSlice(name string) ([]uint, error)

GetUintSlice is the reexport of pflag.FlagSet.GetUintSlice()

GetUintSlice returns the []uint value of a flag with the given name.

func (*FlagSet) GetZipkinExtractFailurePolicy

func (f *FlagSet) GetZipkinExtractFailurePolicy(name string) (zipkin.ExtractFailurePolicy, error)

GetZipkinExtractFailurePolicy return the zipkin.ExtractFailurePolicy value of a flag with the given name

func (*FlagSet) GetZipkinIDGenerator

func (f *FlagSet) GetZipkinIDGenerator(name string) (idgenerator.IDGenerator, error)

GetZipkinIDGenerator return the idgenerator.IDGenerator value of a flag with the given name

func (*FlagSet) IP

func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP

IP is the reexport of pflag.FlagSet.IP()

IP defines an net.IP flag with specified name, default value, and usage string. The return value is the address of an net.IP variable that stores the value of the flag.

func (*FlagSet) IPMask

func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask

IPMask is the reexport of pflag.FlagSet.IPMask()

IPMask defines an net.IPMask flag with specified name, default value, and usage string. The return value is the address of an net.IPMask variable that stores the value of the flag.

func (*FlagSet) IPMaskP

func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask

IPMaskP is the reexport of pflag.FlagSet.IPMaskP()

IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPMaskVar

func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string)

IPMaskVar is the reexport of pflag.FlagSet.IPMaskVar()

IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string. The argument p points to an net.IPMask variable in which to store the value of the flag.

func (*FlagSet) IPMaskVarP

func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string)

IPMaskVarP is the reexport of pflag.FlagSet.IPMaskVarP()

IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPNet

func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet

IPNet is the reexport of pflag.FlagSet.IPNet()

IPNet defines an net.IPNet flag with specified name, default value, and usage string. The return value is the address of an net.IPNet variable that stores the value of the flag.

func (*FlagSet) IPNetP

func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet

IPNetP is the reexport of pflag.FlagSet.IPNetP()

IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPNetSlice

func (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet

IPNetSlice is the reexport of pflag.FlagSet.IPNetSlice()

IPNetSlice defines a []net.IPNet flag with specified name, default value, and usage string. The return value is the address of a []net.IPNet variable that stores the value of that flag.

func (*FlagSet) IPNetSliceP

func (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet

IPNetSliceP is the reexport of pflag.FlagSet.IPNetSliceP()

IPNetSliceP is like IPNetSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPNetSliceVar

func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string)

IPNetSliceVar is the reexport of pflag.FlagSet.IPNetSliceVar()

IPNetSliceVar defines a ipNetSlice flag with specified name, default value, and usage string. The argument p points to a []net.IPNet variable in which to store the value of the flag.

func (*FlagSet) IPNetSliceVarP

func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string)

IPNetSliceVarP is the reexport of pflag.FlagSet.IPNetSliceVarP()

IPNetSliceVarP is like IPNetSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPNetVar

func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string)

IPNetVar is the reexport of pflag.FlagSet.IPNetVar()

IPNetVar defines an net.IPNet flag with specified name, default value, and usage string. The argument p points to an net.IPNet variable in which to store the value of the flag.

func (*FlagSet) IPNetVarP

func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string)

IPNetVarP is the reexport of pflag.FlagSet.IPNetVarP()

IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPP

func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP

IPP is the reexport of pflag.FlagSet.IPP()

IPP is like IP, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPSlice

func (f *FlagSet) IPSlice(name string, value []net.IP, usage string) *[]net.IP

IPSlice is the reexport of pflag.FlagSet.IPSlice()

IPSlice defines a []net.IP flag with specified name, default value, and usage string. The return value is the address of a []net.IP variable that stores the value of that flag.

func (*FlagSet) IPSliceP

func (f *FlagSet) IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP

IPSliceP is the reexport of pflag.FlagSet.IPSliceP()

IPSliceP is like IPSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPSliceVar

func (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string)

IPSliceVar is the reexport of pflag.FlagSet.IPSliceVar()

IPSliceVar defines a ipSlice flag with specified name, default value, and usage string. The argument p points to a []net.IP variable in which to store the value of the flag.

func (*FlagSet) IPSliceVarP

func (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string)

IPSliceVarP is the reexport of pflag.FlagSet.IPSliceVarP()

IPSliceVarP is like IPSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPVar

func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string)

IPVar is the reexport of pflag.FlagSet.IPVar()

IPVar defines an net.IP flag with specified name, default value, and usage string. The argument p points to an net.IP variable in which to store the value of the flag.

func (*FlagSet) IPVarP

func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string)

IPVarP is the reexport of pflag.FlagSet.IPVarP()

IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortInt

func (f *FlagSet) IPv4PortInt(name string, value int, usage string) *int

IPv4PortInt defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortIntP

func (f *FlagSet) IPv4PortIntP(name, shorthand string, value int, usage string) *int

IPv4PortIntP is like IPv4PortInt, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortIntVar

func (f *FlagSet) IPv4PortIntVar(p *int, name string, value int, usage string)

IPv4PortIntVar defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortIntVarP

func (f *FlagSet) IPv4PortIntVarP(p *int, name, shorthand string, value int, usage string)

IPv4PortIntVarP is like IPv4PortIntVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortString

func (f *FlagSet) IPv4PortString(name, value, usage string) *string

IPv4PortString defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortStringP

func (f *FlagSet) IPv4PortStringP(name, shorthand, value, usage string) *string

IPv4PortStringP is like IPv4PortString, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortStringVar

func (f *FlagSet) IPv4PortStringVar(p *string, name, value, usage string)

IPv4PortStringVar defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortStringVarP

func (f *FlagSet) IPv4PortStringVarP(p *string, name, shorthand, value, usage string)

IPv4PortStringVarP is like IPv4PortStringVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortUint

func (f *FlagSet) IPv4PortUint(name string, value uint, usage string) *uint

IPv4PortUint defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortUintP

func (f *FlagSet) IPv4PortUintP(name, shorthand string, value uint, usage string) *uint

IPv4PortUintP is like IPv4PortUint, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IPv4PortUintVar

func (f *FlagSet) IPv4PortUintVar(p *uint, name string, value uint, usage string)

IPv4PortUintVar defines a string flag with specified name, default value, and usage string.

func (*FlagSet) IPv4PortUintVarP

func (f *FlagSet) IPv4PortUintVarP(p *uint, name, shorthand string, value uint, usage string)

IPv4PortUintVarP is like IPv4PortUintVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int

func (f *FlagSet) Int(name string, value int, usage string) *int

Int is the reexport of pflag.FlagSet.Int()

Int defines an int flag with specified name, default value, and usage string. The return value is the address of an int variable that stores the value of the flag.

func (*FlagSet) Int16

func (f *FlagSet) Int16(name string, value int16, usage string) *int16

Int16 is the reexport of pflag.FlagSet.Int16()

Int16 defines an int8 flag with specified name, default value, and usage string. The return value is the address of an Int16 variable that stores the value of the flag.

func (*FlagSet) Int16P

func (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16

Int16P is the reexport of pflag.FlagSet.Int16P()

Int16P is like Int16, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int16Var

func (f *FlagSet) Int16Var(p *int16, name string, value int16, usage string)

Int16Var is the reexport of pflag.FlagSet.Int16Var()

Int16Var defines an int8 flag with specified name, default value, and usage string. The argument p points to an int16 variable in which to store the value of the flag.

func (*FlagSet) Int16VarP

func (f *FlagSet) Int16VarP(p *int16, name, shorthand string, value int16, usage string)

Int16VarP is the reexport of pflag.FlagSet.Int16VarP()

Int16VarP is like Int16Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int32

func (f *FlagSet) Int32(name string, value int32, usage string) *int32

Int32 is the reexport of pflag.FlagSet.Int32()

Int32 defines an int32 flag with specified name, default value, and usage string. The return value is the address of an int32 variable that stores the value of the flag.

func (*FlagSet) Int32P

func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32

Int32P is the reexport of pflag.FlagSet.Int32P()

Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int32Slice

func (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32

Int32Slice is the reexport of pflag.FlagSet.Int32Slice()

Int32Slice defines a []int32 flag with specified name, default value, and usage string. The return value is the address of a []int32 variable that stores the value of the flag.

func (*FlagSet) Int32SliceP

func (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32

Int32SliceP is the reexport of pflag.FlagSet.Int32SliceP()

Int32SliceP is like Int32Slice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int32SliceVar

func (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string)

Int32SliceVar is the reexport of pflag.FlagSet.Int32SliceVar()

Int32SliceVar defines a int32Slice flag with specified name, default value, and usage string. The argument p points to a []int32 variable in which to store the value of the flag.

func (*FlagSet) Int32SliceVarP

func (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string)

Int32SliceVarP is the reexport of pflag.FlagSet.Int32SliceVarP()

Int32SliceVarP is like Int32SliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int32Var

func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string)

Int32Var is the reexport of pflag.FlagSet.Int32Var()

Int32Var defines an int32 flag with specified name, default value, and usage string. The argument p points to an int32 variable in which to store the value of the flag.

func (*FlagSet) Int32VarP

func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string)

Int32VarP is the reexport of pflag.FlagSet.Int32VarP()

Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int64

func (f *FlagSet) Int64(name string, value int64, usage string) *int64

Int64 is the reexport of pflag.FlagSet.Int64()

Int64 defines an int64 flag with specified name, default value, and usage string. The return value is the address of an int64 variable that stores the value of the flag.

func (*FlagSet) Int64P

func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64

Int64P is the reexport of pflag.FlagSet.Int64P()

Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int64Slice

func (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64

Int64Slice is the reexport of pflag.FlagSet.Int64Slice()

Int64Slice defines a []int64 flag with specified name, default value, and usage string. The return value is the address of a []int64 variable that stores the value of the flag.

func (*FlagSet) Int64SliceP

func (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64

Int64SliceP is the reexport of pflag.FlagSet.Int64SliceP()

Int64SliceP is like Int64Slice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int64SliceVar

func (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string)

Int64SliceVar is the reexport of pflag.FlagSet.Int64SliceVar()

Int64SliceVar defines a int64Slice flag with specified name, default value, and usage string. The argument p points to a []int64 variable in which to store the value of the flag.

func (*FlagSet) Int64SliceVarP

func (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string)

Int64SliceVarP is the reexport of pflag.FlagSet.Int64SliceVarP()

Int64SliceVarP is like Int64SliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int64Var

func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string)

Int64Var is the reexport of pflag.FlagSet.Int64Var()

Int64Var defines an int64 flag with specified name, default value, and usage string. The argument p points to an int64 variable in which to store the value of the flag.

func (*FlagSet) Int64VarP

func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string)

Int64VarP is the reexport of pflag.FlagSet.Int64VarP()

Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int8

func (f *FlagSet) Int8(name string, value int8, usage string) *int8

Int8 is the reexport of pflag.FlagSet.Int8()

Int8 defines an int8 flag with specified name, default value, and usage string. The return value is the address of an int8 variable that stores the value of the flag.

func (*FlagSet) Int8P

func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8

Int8P is the reexport of pflag.FlagSet.Int8P()

Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Int8Var

func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string)

Int8Var is the reexport of pflag.FlagSet.Int8Var()

Int8Var defines an int8 flag with specified name, default value, and usage string. The argument p points to an int8 variable in which to store the value of the flag.

func (*FlagSet) Int8VarP

func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string)

Int8VarP is the reexport of pflag.FlagSet.Int8VarP()

Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IntP

func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int

IntP is the reexport of pflag.FlagSet.IntP()

IntP is like Int, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IntSlice

func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int

IntSlice is the reexport of pflag.FlagSet.IntSlice()

IntSlice defines a []int flag with specified name, default value, and usage string. The return value is the address of a []int variable that stores the value of the flag.

func (*FlagSet) IntSliceP

func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int

IntSliceP is the reexport of pflag.FlagSet.IntSliceP()

IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IntSliceVar

func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string)

IntSliceVar is the reexport of pflag.FlagSet.IntSliceVar()

IntSliceVar defines a intSlice flag with specified name, default value, and usage string. The argument p points to a []int variable in which to store the value of the flag.

func (*FlagSet) IntSliceVarP

func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string)

IntSliceVarP is the reexport of pflag.FlagSet.IntSliceVarP()

IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) IntVar

func (f *FlagSet) IntVar(p *int, name string, value int, usage string)

IntVar is the reexport of pflag.FlagSet.IntVar()

IntVar defines an int flag with specified name, default value, and usage string. The argument p points to an int variable in which to store the value of the flag.

func (*FlagSet) IntVarP

func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string)

IntVarP is the reexport of pflag.FlagSet.IntVarP()

IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoReadPreferenceMode

func (f *FlagSet) MongoReadPreferenceMode(name string, value readpref.Mode, usage string) *readpref.Mode

MongoReadPreferenceMode defines a readpref.Mode flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) MongoReadPreferenceModeP

func (f *FlagSet) MongoReadPreferenceModeP(name, shorthand string, value readpref.Mode, usage string) *readpref.Mode

MongoReadPreferenceModeP is like MongoReadPreferenceMode, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoReadPreferenceModeVar

func (f *FlagSet) MongoReadPreferenceModeVar(p *readpref.Mode, name string, value readpref.Mode, usage string)

MongoReadPreferenceModeVar defines a readpref.Mode flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) MongoReadPreferenceModeVarP

func (f *FlagSet) MongoReadPreferenceModeVarP(p *readpref.Mode, name, shorthand string, value readpref.Mode, usage string)

MongoReadPreferenceModeVarP is like MongoReadPreferenceModeVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoTagSet

func (f *FlagSet) MongoTagSet(name string, value tag.Set, usage string) *tag.Set

MongoTagSet defines a tag.Set flag with specified name, default value, and usage string. The return value is the address of a tag.Set variable that stores the value of the flag.

func (*FlagSet) MongoTagSetP

func (f *FlagSet) MongoTagSetP(name, shorthand string, value tag.Set, usage string) *tag.Set

MongoTagSetP is like MongoTagSet, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoTagSetSlice

func (f *FlagSet) MongoTagSetSlice(name string, value []tag.Set, usage string) *[]tag.Set

MongoTagSetSlice defines a []tag.Set flag with specified name, default value, and usage string. The return value is the address of a tag.Set variable that stores the value of the flag.

func (*FlagSet) MongoTagSetSliceP

func (f *FlagSet) MongoTagSetSliceP(name, shorthand string, value []tag.Set, usage string) *[]tag.Set

MongoTagSetSliceP is like MongoTagSetSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoTagSetSliceVar

func (f *FlagSet) MongoTagSetSliceVar(p *[]tag.Set, name string, value []tag.Set, usage string)

MongoTagSetSliceVar defines a tag.Set Slice flag with specified name, default value, and usage string. The argument p points to a []tag.Set variable in which to store the value of the flag.

func (*FlagSet) MongoTagSetSliceVarP

func (f *FlagSet) MongoTagSetSliceVarP(p *[]tag.Set, name, shorthand string, value []tag.Set, usage string)

MongoTagSetSliceVarP is like MongoTagSetSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) MongoTagSetVar

func (f *FlagSet) MongoTagSetVar(p *tag.Set, name string, value tag.Set, usage string)

MongoTagSetVar defines a intSlice flag with specified name, default value, and usage string. The argument p points to a tag.Set variable in which to store the value of the flag.

func (*FlagSet) MongoTagSetVarP

func (f *FlagSet) MongoTagSetVarP(p *tag.Set, name, shorthand string, value tag.Set, usage string)

MongoTagSetVarP is like MongoTagSetVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) NArgs

func (f *FlagSet) NArgs() int

func (*FlagSet) PrometheusHandlerErrorHandling

func (f *FlagSet) PrometheusHandlerErrorHandling(name string, value promhttp.HandlerErrorHandling, usage string) *promhttp.HandlerErrorHandling

PrometheusHandlerErrorHandling defines a promhttp.HandlerErrorHandling flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) PrometheusHandlerErrorHandlingP

func (f *FlagSet) PrometheusHandlerErrorHandlingP(name, shorthand string, value promhttp.HandlerErrorHandling, usage string) *promhttp.HandlerErrorHandling

PrometheusHandlerErrorHandlingP is like PrometheusHandlerErrorHandling, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) PrometheusHandlerErrorHandlingVar

func (f *FlagSet) PrometheusHandlerErrorHandlingVar(p *promhttp.HandlerErrorHandling, name string, value promhttp.HandlerErrorHandling, usage string)

PrometheusHandlerErrorHandlingVar defines a promhttp.HandlerErrorHandling flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) PrometheusHandlerErrorHandlingVarP

func (f *FlagSet) PrometheusHandlerErrorHandlingVarP(p *promhttp.HandlerErrorHandling, name, shorthand string, value promhttp.HandlerErrorHandling, usage string)

PrometheusHandlerErrorHandlingVarP is like PrometheusHandlerErrorHandlingVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) String

func (f *FlagSet) String(name string, value string, usage string) *string

String is the reexport of pflag.FlagSet.String()

String defines a string flag with specified name, default value, and usage string. The return value is the address of a string variable that stores the value of the flag.

func (*FlagSet) StringArray

func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string

StringArray is the reexport of pflag.FlagSet.StringArray()

StringArray defines a string flag with specified name, default value, and usage string. The return value is the address of a []string variable that stores the value of the flag. The value of each argument will not try to be separated by comma. Use a StringSlice for that.

func (*FlagSet) StringArrayP

func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string

StringArrayP is the reexport of pflag.FlagSet.StringArrayP()

StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringArrayVar

func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string)

StringArrayVar is the reexport of pflag.FlagSet.StringArrayVar()

StringArrayVar defines a string flag with specified name, default value, and usage string. The argument p points to a []string variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma. Use a StringSlice for that.

func (*FlagSet) StringArrayVarP

func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string)

StringArrayVarP is the reexport of pflag.FlagSet.StringArrayVarP()

StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringP

func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string

StringP is the reexport of pflag.FlagSet.StringP()

StringP is like String, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringSlice

func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string

StringSlice is the reexport of pflag.FlagSet.StringSlice()

StringSlice defines a string flag with specified name, default value, and usage string. The return value is the address of a []string variable that stores the value of the flag. Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. For example:

--ss="v1,v2" --ss="v3"

will result in

[]string{"v1", "v2", "v3"}

func (*FlagSet) StringSliceP

func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string

StringSliceP is the reexport of pflag.FlagSet.StringSliceP()

StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringSliceVar

func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string)

StringSliceVar is the reexport of pflag.FlagSet.StringSliceVar()

StringSliceVar defines a string flag with specified name, default value, and usage string. The argument p points to a []string variable in which to store the value of the flag. Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. For example:

--ss="v1,v2" --ss="v3"

will result in

[]string{"v1", "v2", "v3"}

func (*FlagSet) StringSliceVarP

func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string)

StringSliceVarP is the reexport of pflag.FlagSet.StringSliceVarP()

StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToFloat32

func (f *FlagSet) StringToFloat32(name string, value map[string]float32, usage string) *map[string]float32

StringToFloat32 defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]float32 variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToFloat32P

func (f *FlagSet) StringToFloat32P(name, shorthand string, value map[string]float32, usage string) *map[string]float32

StringToFloat32P is like StringToFloat32, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToFloat32Var

func (f *FlagSet) StringToFloat32Var(p *map[string]float32, name string, value map[string]float32, usage string)

StringToFloat32Var defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]float32 variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToFloat32VarP

func (f *FlagSet) StringToFloat32VarP(p *map[string]float32, name, shorthand string, value map[string]float32, usage string)

StringToFloat32VarP is like StringToFloat32Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToFloat64

func (f *FlagSet) StringToFloat64(name string, value map[string]float64, usage string) *map[string]float64

StringToFloat64 defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]float64 variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToFloat64P

func (f *FlagSet) StringToFloat64P(name, shorthand string, value map[string]float64, usage string) *map[string]float64

StringToFloat64P is like StringToFloat64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToFloat64Var

func (f *FlagSet) StringToFloat64Var(p *map[string]float64, name string, value map[string]float64, usage string)

StringToFloat64Var defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]float64 variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToFloat64VarP

func (f *FlagSet) StringToFloat64VarP(p *map[string]float64, name, shorthand string, value map[string]float64, usage string)

StringToFloat64VarP is like StringToFloat64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToInt

func (f *FlagSet) StringToInt(name string, value map[string]int, usage string) *map[string]int

StringToInt is the reexport of pflag.FlagSet.StringToInt()

StringToInt defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]int variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToInt32

func (f *FlagSet) StringToInt32(name string, value map[string]int32, usage string) *map[string]int32

StringToInt32 defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]int32 variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToInt32P

func (f *FlagSet) StringToInt32P(name, shorthand string, value map[string]int32, usage string) *map[string]int32

StringToInt32P is like StringToInt32, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToInt32Var

func (f *FlagSet) StringToInt32Var(p *map[string]int32, name string, value map[string]int32, usage string)

StringToInt32Var defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]int32 variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToInt32VarP

func (f *FlagSet) StringToInt32VarP(p *map[string]int32, name, shorthand string, value map[string]int32, usage string)

StringToInt32VarP is like StringToInt32Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToInt64

func (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64

StringToInt64 is the reexport of pflag.FlagSet.StringToInt64()

StringToInt64 defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]int64 variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToInt64P

func (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64

StringToInt64P is the reexport of pflag.FlagSet.StringToInt64P()

StringToInt64P is like StringToInt64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToInt64Var

func (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string)

StringToInt64Var is the reexport of pflag.FlagSet.StringToInt64Var()

StringToInt64Var defines a string flag with specified name, default value, and usage string. The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToInt64VarP

func (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, usage string)

StringToInt64VarP is the reexport of pflag.FlagSet.StringToInt64VarP()

StringToInt64VarP is like StringToInt64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToIntP

func (f *FlagSet) StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int

StringToIntP is the reexport of pflag.FlagSet.StringToIntP()

StringToIntP is like StringToInt, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToIntVar

func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string)

StringToIntVar is the reexport of pflag.FlagSet.StringToIntVar()

StringToIntVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]int variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToIntVarP

func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string)

StringToIntVarP is the reexport of pflag.FlagSet.StringToIntVarP()

StringToIntVarP is like StringToIntVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToString

func (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string

StringToString is the reexport of pflag.FlagSet.StringToString()

StringToString defines a string flag with specified name, default value, and usage string. The return value is the address of a map[string]string variable that stores the value of the flag. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToStringP

func (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string

StringToStringP is the reexport of pflag.FlagSet.StringToStringP()

StringToStringP is like StringToString, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringToStringVar

func (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string)

StringToStringVar is the reexport of pflag.FlagSet.StringToStringVar()

StringToStringVar defines a string flag with specified name, default value, and usage string. The argument p points to a map[string]string variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma

func (*FlagSet) StringToStringVarP

func (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, usage string)

StringToStringVarP is the reexport of pflag.FlagSet.StringToStringVarP()

StringToStringVarP is like StringToStringVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) StringVar

func (f *FlagSet) StringVar(p *string, name string, value string, usage string)

StringVar is the reexport of pflag.FlagSet.StringVar

StringVar defines a string flag with specified name, default value, and usage string. The argument p points to a string variable in which to store the value of the flag.

func (*FlagSet) StringVarP

func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string)

StringVarP is the reexport of pflag.FlagSet.StringVarP()

StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint

func (f *FlagSet) Uint(name string, value uint, usage string) *uint

Uint is the reexport of pflag.FlagSet.Uint()

Uint defines a uint flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) Uint16

func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16

Uint16 is the reexport of pflag.FlagSet.Uint16()

Uint16 defines a uint flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) Uint16P

func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16

Uint16P is the reexport of pflag.FlagSet.Uint16P()

Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint16Var

func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string)

Uint16Var is the reexport of pflag.FlagSet.Uint16Var()

Uint16Var defines a uint flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) Uint16VarP

func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string)

Uint16VarP is the reexport of pflag.FlagSet.Uint16VarP()

Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint32

func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32

Uint32 is the reexport of pflag.FlagSet.Uint32()

Uint32 defines a uint32 flag with specified name, default value, and usage string. The return value is the address of a uint32 variable that stores the value of the flag.

func (*FlagSet) Uint32P

func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32

Uint32P is the reexport of pflag.FlagSet.Uint32P()

Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint32Var

func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string)

Uint32Var is the reexport of pflag.FlagSet.Uint32Var()

Uint32Var defines a uint32 flag with specified name, default value, and usage string. The argument p points to a uint32 variable in which to store the value of the flag.

func (*FlagSet) Uint32VarP

func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string)

Uint32VarP is the reexport of pflag.FlagSet.Uint32VarP()

Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint64

func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64

Uint64 is the reexport of pflag.FlagSet.Uint64()

Uint64 defines a uint64 flag with specified name, default value, and usage string. The return value is the address of a uint64 variable that stores the value of the flag.

func (*FlagSet) Uint64P

func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64

Uint64P is the reexport of pflag.FlagSet.Uint64P()

Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint64Var

func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string)

Uint64Var is the reexport of pflag.FlagSet.Uint64Var()

Uint64Var defines a uint64 flag with specified name, default value, and usage string. The argument p points to a uint64 variable in which to store the value of the flag.

func (*FlagSet) Uint64VarP

func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string)

Uint64VarP is the reexport of pflag.FlagSet.Uint64VarP()

Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint8

func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8

Uint8 is the reexport of pflag.FlagSet.Uint8()

Uint8 defines a uint8 flag with specified name, default value, and usage string. The return value is the address of a uint8 variable that stores the value of the flag.

func (*FlagSet) Uint8P

func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8

Uint8P is the reexport of pflag.FlagSet.Uint8P()

Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Uint8Var

func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string)

Uint8Var is the reexport of pflag.FlagSet.Uint8Var()

Uint8Var defines a uint8 flag with specified name, default value, and usage string. The argument p points to a uint8 variable in which to store the value of the flag.

func (*FlagSet) Uint8VarP

func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string)

Uint8VarP is the reexport of pflag.FlagSet.Uint8VarP()

Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) UintP

func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint

UintP is the reexport of pflag.FlagSet.UintP()

UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) UintSlice

func (f *FlagSet) UintSlice(name string, value []uint, usage string) *[]uint

UintSlice is the reexport of pflag.FlagSet.UintSlice()

UintSlice defines a []uint flag with specified name, default value, and usage string. The return value is the address of a []uint variable that stores the value of the flag.

func (*FlagSet) UintSliceP

func (f *FlagSet) UintSliceP(name, shorthand string, value []uint, usage string) *[]uint

UintSliceP is the reexport of pflag.FlagSet.UintSliceP()

UintSliceP is like UintSlice, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) UintSliceVar

func (f *FlagSet) UintSliceVar(p *[]uint, name string, value []uint, usage string)

UintSliceVar is the reexport of pflag.FlagSet.UintSliceVar()

UintSliceVar defines a uintSlice flag with specified name, default value, and usage string. The argument p points to a []uint variable in which to store the value of the flag.

func (*FlagSet) UintSliceVarP

func (f *FlagSet) UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string)

UintSliceVarP is the reexport of pflag.FlagSet.UintSliceVarP()

UintSliceVarP is like UintSliceVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) UintVar

func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string)

UintVar is the reexport of pflag.FlagSet.UintVar()

UintVar defines a uint flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) UintVarP

func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string)

UintVarP is the reexport of pflag.FlagSet.UintVarP()

UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) Var

func (f *FlagSet) Var(value Value, name string, usage string)

Var is the reexport of pflag.FlagSet.Var()

Var defines a flag with the specified name and usage string. The type and value of the flag are represented by the first argument, of type Value, which typically holds a user-defined implementation of Value. For instance, the caller could create a flag that turns a comma-separated string into a slice of strings by giving the slice the methods of Value; in particular, Set would decompose the comma-separated string into the slice.

func (*FlagSet) VarP

func (f *FlagSet) VarP(value Value, name, shorthand, usage string)

VarP is the reexport of pflag.VarP

VarP is like Var, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) ZipkinExtractFailurePolicy

func (f *FlagSet) ZipkinExtractFailurePolicy(name string, value zipkin.ExtractFailurePolicy, usage string) *zipkin.ExtractFailurePolicy

ZipkinExtractFailurePolicy defines a zipkin.ExtractFailurePolicy flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) ZipkinExtractFailurePolicyP

func (f *FlagSet) ZipkinExtractFailurePolicyP(name, shorthand string, value zipkin.ExtractFailurePolicy, usage string) *zipkin.ExtractFailurePolicy

ZipkinExtractFailurePolicyP is like ZipkinExtractFailurePolicy, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) ZipkinExtractFailurePolicyVar

func (f *FlagSet) ZipkinExtractFailurePolicyVar(p *zipkin.ExtractFailurePolicy, name string, value zipkin.ExtractFailurePolicy, usage string)

ZipkinExtractFailurePolicyVar defines a zipkin.ExtractFailurePolicy flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) ZipkinExtractFailurePolicyVarP

func (f *FlagSet) ZipkinExtractFailurePolicyVarP(p *zipkin.ExtractFailurePolicy, name, shorthand string, value zipkin.ExtractFailurePolicy, usage string)

ZipkinExtractFailurePolicyVarP is like ZipkinExtractFailurePolicyVar, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) ZipkinIDGenerator

func (f *FlagSet) ZipkinIDGenerator(name string, value ZipkinIDGenerator, usage string) *idgenerator.IDGenerator

ZipkinExtractFailurePolicy defines a ExtractFailurePolicy flag with specified name, default value, and usage string. The return value is the address of a uint variable that stores the value of the flag.

func (*FlagSet) ZipkinIDGeneratorP

func (f *FlagSet) ZipkinIDGeneratorP(name, shorthand string, value ZipkinIDGenerator, usage string) *idgenerator.IDGenerator

ZipkinExtractFailurePolicyP is like ZipkinExtractFailurePolicy, but accepts a shorthand letter that can be used after a single dash.

func (*FlagSet) ZipkinIDGeneratorVar

func (f *FlagSet) ZipkinIDGeneratorVar(p *idgenerator.IDGenerator, name string, value ZipkinIDGenerator, usage string)

ZipkinIDGeneratorVar defines a idgenerator.IDGenerator flag with specified name, default value, and usage string. The argument p points to a uint variable in which to store the value of the flag.

func (*FlagSet) ZipkinIDGeneratorVarP

func (f *FlagSet) ZipkinIDGeneratorVarP(p *idgenerator.IDGenerator, name, shorthand string, value ZipkinIDGenerator, usage string)

ZipkinIDGeneratorVarP is like ZipkinIDGeneratorVarVar, but accepts a shorthand letter that can be used after a single dash.

type Flags

type Flags interface {
	// BindFlags binds Structure fields with the command line flags
	BindFlags(fs *FlagSet)

	// Parse is used to check the validity of the config structure,
	// which aims to find the weird values before boot the services.
	//
	//
	// If the config structure does not need to do any validity check,
	// you can just leave it with {return nil}.
	// See examples/nocheck and examples/check.
	//
	//
	// You can also do some value assignment in this method.
	// See examples/assign
	Parse() (err error)
}

Flags defines a behaviour for custom config structure.

If you want to have a custom config structure, the BindFlags method must be implemented

type Value

type Value interface {
	String() string
	Set(string) error
	Type() string
}

Value is the reexport of pflag.Value

Value is the interface to the dynamic value stored in a flag. (The default value is represented as a string.)

type ZipkinIDGenerator

type ZipkinIDGenerator int
const (
	Random64 ZipkinIDGenerator = iota
	Random128
	RandomTimestamped
)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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