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 ¶
- type ErrorHandling
- type FlagSet
- func (f *FlagSet) AddFlagSet(newSet *FlagSet)
- func (f *FlagSet) AddGoFlag(goflag *goflag.Flag)
- func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet)
- func (f *FlagSet) Args() []string
- func (f *FlagSet) Bool(name string, value bool, usage string) *bool
- func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool
- func (f *FlagSet) BoolSlice(name string, value []bool, usage string) *[]bool
- func (f *FlagSet) BoolSliceP(name, shorthand string, value []bool, usage string) *[]bool
- func (f *FlagSet) BoolSliceVar(p *[]bool, name string, value []bool, usage string)
- func (f *FlagSet) BoolSliceVarP(p *[]bool, name, shorthand string, value []bool, usage string)
- func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string)
- func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string)
- func (f *FlagSet) BytesBase64Var(p *[]byte, name string, value []byte, usage string)
- func (f *FlagSet) BytesBase64VarP(p *[]byte, name, shorthand string, value []byte, usage string)
- func (f *FlagSet) BytesHex(name string, value []byte, usage string) *[]byte
- func (f *FlagSet) BytesHexP(name, shorthand string, value []byte, usage string) *[]byte
- func (f *FlagSet) BytesHexVar(p *[]byte, name string, value []byte, usage string)
- func (f *FlagSet) BytesHexVarP(p *[]byte, name, shorthand string, value []byte, usage string)
- func (f *FlagSet) Count(name string, usage string) *int
- func (f *FlagSet) CountP(name, shorthand string, usage string) *int
- func (f *FlagSet) CountVar(p *int, name string, usage string)
- func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string)
- func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration
- func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration
- func (f *FlagSet) DurationSlice(name string, value []time.Duration, usage string) *[]time.Duration
- func (f *FlagSet) DurationSliceP(name, shorthand string, value []time.Duration, usage string) *[]time.Duration
- func (f *FlagSet) DurationSliceVar(p *[]time.Duration, name string, value []time.Duration, usage string)
- func (f *FlagSet) DurationSliceVarP(p *[]time.Duration, name, shorthand string, value []time.Duration, ...)
- func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string)
- func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string)
- func (f *FlagSet) Float32(name string, value float32, usage string) *float32
- func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32
- func (f *FlagSet) Float32Slice(name string, value []float32, usage string) *[]float32
- func (f *FlagSet) Float32SliceP(name, shorthand string, value []float32, usage string) *[]float32
- func (f *FlagSet) Float32SliceVar(p *[]float32, name string, value []float32, usage string)
- func (f *FlagSet) Float32SliceVarP(p *[]float32, name, shorthand string, value []float32, usage string)
- func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string)
- func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string)
- func (f *FlagSet) Float64(name string, value float64, usage string) *float64
- func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64
- func (f *FlagSet) Float64Slice(name string, value []float64, usage string) *[]float64
- func (f *FlagSet) Float64SliceP(name, shorthand string, value []float64, usage string) *[]float64
- func (f *FlagSet) Float64SliceVar(p *[]float64, name string, value []float64, usage string)
- func (f *FlagSet) Float64SliceVarP(p *[]float64, name, shorthand string, value []float64, usage string)
- func (f *FlagSet) Float64ToFloat64(name string, value map[float64]float64, usage string) *map[float64]float64
- func (f *FlagSet) Float64ToFloat64P(name, shorthand string, value map[float64]float64, usage string) *map[float64]float64
- func (f *FlagSet) Float64ToFloat64Var(p *map[float64]float64, name string, value map[float64]float64, usage string)
- func (f *FlagSet) Float64ToFloat64VarP(p *map[float64]float64, name, shorthand string, value map[float64]float64, ...)
- func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string)
- func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string)
- func (f *FlagSet) GetBool(name string) (bool, error)
- func (f *FlagSet) GetBoolSlice(name string) ([]bool, error)
- func (f *FlagSet) GetBytesBase64(name string) ([]byte, error)
- func (f *FlagSet) GetBytesHex(name string) ([]byte, error)
- func (f *FlagSet) GetCount(name string) (int, error)
- func (f *FlagSet) GetDuration(name string) (time.Duration, error)
- func (f *FlagSet) GetDurationSlice(name string) ([]time.Duration, error)
- func (f *FlagSet) GetFlagSet() *pflag.FlagSet
- func (f *FlagSet) GetFloat32(name string) (float32, error)
- func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error)
- func (f *FlagSet) GetFloat64(name string) (float64, error)
- func (f *FlagSet) GetFloat64Slice(name string) ([]float64, error)
- func (f *FlagSet) GetFloat64ToFloat64(name string) (map[float64]float64, error)
- func (f *FlagSet) GetIP(name string) (net.IP, error)
- func (f *FlagSet) GetIPNet(name string) (net.IPNet, error)
- func (f *FlagSet) GetIPNetSlice(name string) ([]net.IPNet, error)
- func (f *FlagSet) GetIPSlice(name string) ([]net.IP, error)
- func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error)
- func (f *FlagSet) GetIPv4PortInt(name string) (int, error)
- func (f *FlagSet) GetIPv4PortString(name string) (string, error)
- func (f *FlagSet) GetIPv4PortUint(name string) (uint, error)
- func (f *FlagSet) GetInt(name string) (int, error)
- func (f *FlagSet) GetInt16(name string) (int16, error)
- func (f *FlagSet) GetInt32(name string) (int32, error)
- func (f *FlagSet) GetInt32Slice(name string) ([]int32, error)
- func (f *FlagSet) GetInt64(name string) (int64, error)
- func (f *FlagSet) GetInt64Slice(name string) ([]int64, error)
- func (f *FlagSet) GetInt8(name string) (int8, error)
- func (f *FlagSet) GetIntSlice(name string) ([]int, error)
- func (f *FlagSet) GetMongoReadPreferenceMode(name string) (readpref.Mode, error)
- func (f *FlagSet) GetMongoTagSet(name string) (tag.Set, error)
- func (f *FlagSet) GetMongoTagSetSlice(name string) ([]tag.Set, error)
- func (f *FlagSet) GetPrometheusHandlerErrorHandling(name string) (promhttp.HandlerErrorHandling, error)
- func (f *FlagSet) GetString(name string) (string, error)
- func (f *FlagSet) GetStringArray(name string) ([]string, error)
- func (f *FlagSet) GetStringSlice(name string) ([]string, error)
- func (f *FlagSet) GetStringToFloat32(name string) (map[string]float32, error)
- func (f *FlagSet) GetStringToFloat64(name string) (map[string]float64, error)
- func (f *FlagSet) GetStringToInt(name string) (map[string]int, error)
- func (f *FlagSet) GetStringToInt32(name string) (map[string]int32, error)
- func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error)
- func (f *FlagSet) GetStringToString(name string) (map[string]string, error)
- func (f *FlagSet) GetUint(name string) (uint, error)
- func (f *FlagSet) GetUint16(name string) (uint16, error)
- func (f *FlagSet) GetUint32(name string) (uint32, error)
- func (f *FlagSet) GetUint64(name string) (uint64, error)
- func (f *FlagSet) GetUint8(name string) (uint8, error)
- func (f *FlagSet) GetUintSlice(name string) ([]uint, error)
- func (f *FlagSet) GetZipkinExtractFailurePolicy(name string) (zipkin.ExtractFailurePolicy, error)
- func (f *FlagSet) GetZipkinIDGenerator(name string) (idgenerator.IDGenerator, error)
- func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP
- func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask
- func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask
- func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string)
- func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string)
- func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet
- func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet
- func (f *FlagSet) IPNetSlice(name string, value []net.IPNet, usage string) *[]net.IPNet
- func (f *FlagSet) IPNetSliceP(name, shorthand string, value []net.IPNet, usage string) *[]net.IPNet
- func (f *FlagSet) IPNetSliceVar(p *[]net.IPNet, name string, value []net.IPNet, usage string)
- func (f *FlagSet) IPNetSliceVarP(p *[]net.IPNet, name, shorthand string, value []net.IPNet, usage string)
- func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string)
- func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string)
- func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP
- func (f *FlagSet) IPSlice(name string, value []net.IP, usage string) *[]net.IP
- func (f *FlagSet) IPSliceP(name, shorthand string, value []net.IP, usage string) *[]net.IP
- func (f *FlagSet) IPSliceVar(p *[]net.IP, name string, value []net.IP, usage string)
- func (f *FlagSet) IPSliceVarP(p *[]net.IP, name, shorthand string, value []net.IP, usage string)
- func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string)
- func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string)
- func (f *FlagSet) IPv4PortInt(name string, value int, usage string) *int
- func (f *FlagSet) IPv4PortIntP(name, shorthand string, value int, usage string) *int
- func (f *FlagSet) IPv4PortIntVar(p *int, name string, value int, usage string)
- func (f *FlagSet) IPv4PortIntVarP(p *int, name, shorthand string, value int, usage string)
- func (f *FlagSet) IPv4PortString(name, value, usage string) *string
- func (f *FlagSet) IPv4PortStringP(name, shorthand, value, usage string) *string
- func (f *FlagSet) IPv4PortStringVar(p *string, name, value, usage string)
- func (f *FlagSet) IPv4PortStringVarP(p *string, name, shorthand, value, usage string)
- func (f *FlagSet) IPv4PortUint(name string, value uint, usage string) *uint
- func (f *FlagSet) IPv4PortUintP(name, shorthand string, value uint, usage string) *uint
- func (f *FlagSet) IPv4PortUintVar(p *uint, name string, value uint, usage string)
- func (f *FlagSet) IPv4PortUintVarP(p *uint, name, shorthand string, value uint, usage string)
- func (f *FlagSet) Int(name string, value int, usage string) *int
- func (f *FlagSet) Int16(name string, value int16, usage string) *int16
- func (f *FlagSet) Int16P(name, shorthand string, value int16, usage string) *int16
- func (f *FlagSet) Int16Var(p *int16, name string, value int16, usage string)
- func (f *FlagSet) Int16VarP(p *int16, name, shorthand string, value int16, usage string)
- func (f *FlagSet) Int32(name string, value int32, usage string) *int32
- func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32
- func (f *FlagSet) Int32Slice(name string, value []int32, usage string) *[]int32
- func (f *FlagSet) Int32SliceP(name, shorthand string, value []int32, usage string) *[]int32
- func (f *FlagSet) Int32SliceVar(p *[]int32, name string, value []int32, usage string)
- func (f *FlagSet) Int32SliceVarP(p *[]int32, name, shorthand string, value []int32, usage string)
- func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string)
- func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string)
- func (f *FlagSet) Int64(name string, value int64, usage string) *int64
- func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64
- func (f *FlagSet) Int64Slice(name string, value []int64, usage string) *[]int64
- func (f *FlagSet) Int64SliceP(name, shorthand string, value []int64, usage string) *[]int64
- func (f *FlagSet) Int64SliceVar(p *[]int64, name string, value []int64, usage string)
- func (f *FlagSet) Int64SliceVarP(p *[]int64, name, shorthand string, value []int64, usage string)
- func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string)
- func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string)
- func (f *FlagSet) Int8(name string, value int8, usage string) *int8
- func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8
- func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string)
- func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string)
- func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int
- func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int
- func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int
- func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string)
- func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string)
- func (f *FlagSet) IntVar(p *int, name string, value int, usage string)
- func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string)
- func (f *FlagSet) MongoReadPreferenceMode(name string, value readpref.Mode, usage string) *readpref.Mode
- func (f *FlagSet) MongoReadPreferenceModeP(name, shorthand string, value readpref.Mode, usage string) *readpref.Mode
- func (f *FlagSet) MongoReadPreferenceModeVar(p *readpref.Mode, name string, value readpref.Mode, usage string)
- func (f *FlagSet) MongoReadPreferenceModeVarP(p *readpref.Mode, name, shorthand string, value readpref.Mode, usage string)
- func (f *FlagSet) MongoTagSet(name string, value tag.Set, usage string) *tag.Set
- func (f *FlagSet) MongoTagSetP(name, shorthand string, value tag.Set, usage string) *tag.Set
- func (f *FlagSet) MongoTagSetSlice(name string, value []tag.Set, usage string) *[]tag.Set
- func (f *FlagSet) MongoTagSetSliceP(name, shorthand string, value []tag.Set, usage string) *[]tag.Set
- func (f *FlagSet) MongoTagSetSliceVar(p *[]tag.Set, name string, value []tag.Set, usage string)
- func (f *FlagSet) MongoTagSetSliceVarP(p *[]tag.Set, name, shorthand string, value []tag.Set, usage string)
- func (f *FlagSet) MongoTagSetVar(p *tag.Set, name string, value tag.Set, usage string)
- func (f *FlagSet) MongoTagSetVarP(p *tag.Set, name, shorthand string, value tag.Set, usage string)
- func (f *FlagSet) NArgs() int
- func (f *FlagSet) PrometheusHandlerErrorHandling(name string, value promhttp.HandlerErrorHandling, usage string) *promhttp.HandlerErrorHandling
- func (f *FlagSet) PrometheusHandlerErrorHandlingP(name, shorthand string, value promhttp.HandlerErrorHandling, usage string) *promhttp.HandlerErrorHandling
- func (f *FlagSet) PrometheusHandlerErrorHandlingVar(p *promhttp.HandlerErrorHandling, name string, ...)
- func (f *FlagSet) PrometheusHandlerErrorHandlingVarP(p *promhttp.HandlerErrorHandling, name, shorthand string, ...)
- func (f *FlagSet) String(name string, value string, usage string) *string
- func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string
- func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string
- func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string)
- func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string)
- func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string
- func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string
- func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string
- func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string)
- func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string)
- func (f *FlagSet) StringToFloat32(name string, value map[string]float32, usage string) *map[string]float32
- func (f *FlagSet) StringToFloat32P(name, shorthand string, value map[string]float32, usage string) *map[string]float32
- func (f *FlagSet) StringToFloat32Var(p *map[string]float32, name string, value map[string]float32, usage string)
- func (f *FlagSet) StringToFloat32VarP(p *map[string]float32, name, shorthand string, value map[string]float32, ...)
- func (f *FlagSet) StringToFloat64(name string, value map[string]float64, usage string) *map[string]float64
- func (f *FlagSet) StringToFloat64P(name, shorthand string, value map[string]float64, usage string) *map[string]float64
- func (f *FlagSet) StringToFloat64Var(p *map[string]float64, name string, value map[string]float64, usage string)
- func (f *FlagSet) StringToFloat64VarP(p *map[string]float64, name, shorthand string, value map[string]float64, ...)
- func (f *FlagSet) StringToInt(name string, value map[string]int, usage string) *map[string]int
- func (f *FlagSet) StringToInt32(name string, value map[string]int32, usage string) *map[string]int32
- func (f *FlagSet) StringToInt32P(name, shorthand string, value map[string]int32, usage string) *map[string]int32
- func (f *FlagSet) StringToInt32Var(p *map[string]int32, name string, value map[string]int32, usage string)
- func (f *FlagSet) StringToInt32VarP(p *map[string]int32, name, shorthand string, value map[string]int32, ...)
- func (f *FlagSet) StringToInt64(name string, value map[string]int64, usage string) *map[string]int64
- func (f *FlagSet) StringToInt64P(name, shorthand string, value map[string]int64, usage string) *map[string]int64
- func (f *FlagSet) StringToInt64Var(p *map[string]int64, name string, value map[string]int64, usage string)
- func (f *FlagSet) StringToInt64VarP(p *map[string]int64, name, shorthand string, value map[string]int64, ...)
- func (f *FlagSet) StringToIntP(name, shorthand string, value map[string]int, usage string) *map[string]int
- func (f *FlagSet) StringToIntVar(p *map[string]int, name string, value map[string]int, usage string)
- func (f *FlagSet) StringToIntVarP(p *map[string]int, name, shorthand string, value map[string]int, usage string)
- func (f *FlagSet) StringToString(name string, value map[string]string, usage string) *map[string]string
- func (f *FlagSet) StringToStringP(name, shorthand string, value map[string]string, usage string) *map[string]string
- func (f *FlagSet) StringToStringVar(p *map[string]string, name string, value map[string]string, usage string)
- func (f *FlagSet) StringToStringVarP(p *map[string]string, name, shorthand string, value map[string]string, ...)
- func (f *FlagSet) StringVar(p *string, name string, value string, usage string)
- func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string)
- func (f *FlagSet) Uint(name string, value uint, usage string) *uint
- func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16
- func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16
- func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string)
- func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string)
- func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32
- func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32
- func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string)
- func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string)
- func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64
- func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64
- func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string)
- func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string)
- func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8
- func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8
- func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string)
- func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string)
- func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint
- func (f *FlagSet) UintSlice(name string, value []uint, usage string) *[]uint
- func (f *FlagSet) UintSliceP(name, shorthand string, value []uint, usage string) *[]uint
- func (f *FlagSet) UintSliceVar(p *[]uint, name string, value []uint, usage string)
- func (f *FlagSet) UintSliceVarP(p *[]uint, name, shorthand string, value []uint, usage string)
- func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string)
- func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string)
- func (f *FlagSet) Var(value Value, name string, usage string)
- func (f *FlagSet) VarP(value Value, name, shorthand, usage string)
- func (f *FlagSet) ZipkinExtractFailurePolicy(name string, value zipkin.ExtractFailurePolicy, usage string) *zipkin.ExtractFailurePolicy
- func (f *FlagSet) ZipkinExtractFailurePolicyP(name, shorthand string, value zipkin.ExtractFailurePolicy, usage string) *zipkin.ExtractFailurePolicy
- func (f *FlagSet) ZipkinExtractFailurePolicyVar(p *zipkin.ExtractFailurePolicy, name string, value zipkin.ExtractFailurePolicy, ...)
- func (f *FlagSet) ZipkinExtractFailurePolicyVarP(p *zipkin.ExtractFailurePolicy, name, shorthand string, ...)
- func (f *FlagSet) ZipkinIDGenerator(name string, value ZipkinIDGenerator, usage string) *idgenerator.IDGenerator
- func (f *FlagSet) ZipkinIDGeneratorP(name, shorthand string, value ZipkinIDGenerator, usage string) *idgenerator.IDGenerator
- func (f *FlagSet) ZipkinIDGeneratorVar(p *idgenerator.IDGenerator, name string, value ZipkinIDGenerator, usage string)
- func (f *FlagSet) ZipkinIDGeneratorVarP(p *idgenerator.IDGenerator, name, shorthand string, value ZipkinIDGenerator, ...)
- type Flags
- type Value
- type ZipkinIDGenerator
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 ¶
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 ¶
AddGoFlag is the reexport of pflag.FlagSet.AddGoFlag()
AddGoFlag will add the given *flag.Flag to the pflag.FlagSet
func (*FlagSet) AddGoFlagSet ¶
AddGoFlagSet is the reexport of pflag.FlagSet.AddGoFlagSet()
AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet
func (*FlagSet) 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
CountP is the reexport of pflag.FlagSet.CountP()
CountP is like Count only takes a shorthand for the flag name.
func (*FlagSet) CountVar ¶
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 ¶
CountVarP is the reexport of pflag.FlagSet.CountVarP()
CountVarP is like CountVar only take a shorthand for the flag name.
func (*FlagSet) 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
GetBool is the reexport of pflag.FlagSet.GetBool()
GetBool return the bool value of a flag with the given name
func (*FlagSet) GetBoolSlice ¶
GetBoolSlice is the reexport of pflag.FlagSet.GetBoolSlice()
GetBoolSlice returns the []bool value of a flag with the given name.
func (*FlagSet) GetBytesBase64 ¶
GetBytesBase64 is the reexport of pflag.FlagSet.GetBytesBase64()
GetBytesBase64 return the []byte value of a flag with the given name
func (*FlagSet) GetBytesHex ¶
GetBytesHex is the reexport of pflag.FlagSet.GetBytesHex()
GetBytesHex return the []byte value of a flag with the given name
func (*FlagSet) GetCount ¶
GetCount is the reexport of pflag.FlagSet.GetCount()
GetCount return the int value of a flag with the given name
func (*FlagSet) GetDuration ¶
GetDuration is the reexport of pflag.FlagSet.GetDuration()
GetDuration return the duration value of a flag with the given name
func (*FlagSet) GetDurationSlice ¶
GetDurationSlice is the reexport of pflag.FlagSet.GetDurationSlice()
GetDurationSlice returns the []time.Duration value of a flag with the given name
func (*FlagSet) GetFlagSet ¶
GetFlagSet returns the internal plag.FlagSet of FlagSet
func (*FlagSet) GetFloat32 ¶
GetFloat32 is the reexport of pflag.FlagSet.GetFloat32()
GetFloat32 return the float32 value of a flag with the given name
func (*FlagSet) GetFloat32Slice ¶
GetFloat32Slice is the reexport of pflag.FlagSet.GetFloat32Slice()
GetFloat32Slice return the []float32 value of a flag with the given name
func (*FlagSet) GetFloat64 ¶
GetFloat64 is the reexport of pflag.FlagSet.GetFloat64()
GetFloat64 return the float64 value of a flag with the given name
func (*FlagSet) GetFloat64Slice ¶
GetFloat64Slice is the reexport of pflag.FlagSet.GetFloat64Slice()
GetFloat64Slice return the []float64 value of a flag with the given name
func (*FlagSet) GetFloat64ToFloat64 ¶
GetFloat64ToFloat64 return the map[float64]float64 value of a flag with the given name
func (*FlagSet) GetIP ¶
GetIP is the reexport of pflag.FlagSet.GetIP()
GetIP return the net.IP value of a flag with the given name
func (*FlagSet) GetIPNet ¶
GetIPNet is the reexport of pflag.FlagSet.GetIPNet()
GetIPNet return the net.IPNet value of a flag with the given name
func (*FlagSet) GetIPNetSlice ¶
GetIPNetSlice is the reexport of pflag.FlagSet.GetIPNetSlice()
GetIPNetSlice returns the []net.IPNet value of a flag with the given name
func (*FlagSet) GetIPSlice ¶
GetIPSlice is the reexport of pflag.FlagSet.GetIPSlice()
GetIPSlice returns the []net.IP value of a flag with the given name
func (*FlagSet) GetIPv4Mask ¶
GetIPv4Mask is the reexport of pflag.FlagSet.GetIPv4Mask()
GetIPv4Mask return the net.IPv4Mask value of a flag with the given name
func (*FlagSet) GetIPv4PortInt ¶
GetIPv4PortInt return the uint value of a flag with the given name
func (*FlagSet) GetIPv4PortString ¶
GetIPv4PortString return the uint value of a flag with the given name
func (*FlagSet) GetIPv4PortUint ¶
GetIPv4PortUint return the uint value of a flag with the given name
func (*FlagSet) GetInt ¶
GetInt is the reexport of pflag.FlagSet.GetInt()
GetInt return the int value of a flag with the given name
func (*FlagSet) GetInt16 ¶
GetInt16 is the reexport of pflag.FlagSet.GetInt16()
GetInt16 return the int8 value of a flag with the given name
func (*FlagSet) GetInt32 ¶
GetInt32 is the reexport of pflag.FlagSet.GetInt32()
GetInt32 return the int32 value of a flag with the given name
func (*FlagSet) GetInt32Slice ¶
GetInt32Slice is the reexport of pflag.FlagSet.GetInt32Slice()
GetInt32Slice return the []int32 value of a flag with the given name
func (*FlagSet) GetInt64 ¶
GetInt64 is the reexport of pflag.FlagSet.GetInt64()
GetInt64 return the int64 value of a flag with the given name
func (*FlagSet) GetInt64Slice ¶
GetInt64Slice is the reexport of pflag.FlagSet.GetInt64Slice()
GetInt64Slice return the []int64 value of a flag with the given name
func (*FlagSet) GetInt8 ¶
GetInt8 is the reexport of pflag.FlagSet.GetInt8()
GetInt8 return the int8 value of a flag with the given name
func (*FlagSet) GetIntSlice ¶
GetIntSlice is the reexport of pflag.FlagSet.GetIntSlice()
GetIntSlice return the []int value of a flag with the given name
func (*FlagSet) GetMongoReadPreferenceMode ¶
GetMongoReadPreferenceMode return the readpref.Mode value of a flag with the given name
func (*FlagSet) GetMongoTagSet ¶
GetMongoTagSet return the tag.Set value of a flag with the given name
func (*FlagSet) GetMongoTagSetSlice ¶
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 ¶
GetString is the reexport of pflag.FlagSet.GetString()
GetString return the string value of a flag with the given name
func (*FlagSet) GetStringArray ¶
GetStringArray is the reexport of pflag.FlagSet.GetStringArray()
GetStringArray return the []string value of a flag with the given name
func (*FlagSet) GetStringSlice ¶
GetStringSlice is the reexport of pflag.FlagSet.GetStringSlice()
GetStringSlice return the []string value of a flag with the given name
func (*FlagSet) GetStringToFloat32 ¶
GetStringToFloat32 return the map[string]float32 value of a flag with the given name
func (*FlagSet) GetStringToFloat64 ¶
GetStringToFloat64 return the map[string]float64 value of a flag with the given name
func (*FlagSet) GetStringToInt ¶
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 ¶
GetStringToInt32 return the map[string]int32 value of a flag with the given name
func (*FlagSet) GetStringToInt64 ¶
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 ¶
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 ¶
GetUint is the reexport of pflag.FlagSet.GetUint()
GetUint return the uint value of a flag with the given name
func (*FlagSet) GetUint16 ¶
GetUint16 is the reexport of pflag.FlagSet.GetUint16()
GetUint16 return the uint16 value of a flag with the given name
func (*FlagSet) GetUint32 ¶
GetUint32 is the reexport of pflag.FlagSet.GetUint32()
GetUint32 return the uint32 value of a flag with the given name
func (*FlagSet) GetUint64 ¶
GetUint64 is the reexport of pflag.FlagSet.GetUint64()
GetUint64 return the uint64 value of a flag with the given name
func (*FlagSet) GetUint8 ¶
GetUint8 is the reexport of pflag.FlagSet.GetUint8()
GetUint8 return the uint8 value of a flag with the given name
func (*FlagSet) GetUintSlice ¶
GetUintSlice is the reexport of pflag.FlagSet.GetUintSlice()
GetUintSlice returns the []uint value of a flag with the given name.
func (*FlagSet) GetZipkinExtractFailurePolicy ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
IPv4PortInt defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortIntP ¶
IPv4PortIntP is like IPv4PortInt, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) IPv4PortIntVar ¶
IPv4PortIntVar defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortIntVarP ¶
IPv4PortIntVarP is like IPv4PortIntVar, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) IPv4PortString ¶
IPv4PortString defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortStringP ¶
IPv4PortStringP is like IPv4PortString, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) IPv4PortStringVar ¶
IPv4PortStringVar defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortStringVarP ¶
IPv4PortStringVarP is like IPv4PortStringVar, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) IPv4PortUint ¶
IPv4PortUint defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortUintP ¶
IPv4PortUintP is like IPv4PortUint, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) IPv4PortUintVar ¶
IPv4PortUintVar defines a string flag with specified name, default value, and usage string.
func (*FlagSet) IPv4PortUintVarP ¶
IPv4PortUintVarP is like IPv4PortUintVar, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
MongoTagSetP is like MongoTagSet, but accepts a shorthand letter that can be used after a single dash.
func (*FlagSet) MongoTagSetSlice ¶
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 ¶
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 ¶
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 ¶
MongoTagSetVarP is like MongoTagSetVar, but accepts a shorthand letter that can be used after a single dash.
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 )
Source Files ¶
- bool.go
- bool_slice.go
- bytes.go
- count.go
- duration.go
- duration_slice.go
- flag.go
- float32.go
- float32_slice.go
- float64.go
- float64_slice.go
- float64_to_float64.go
- golangflag.go
- int.go
- int16.go
- int32.go
- int32_slice.go
- int64.go
- int64_slice.go
- int8.go
- int_slice.go
- ip.go
- ip4_port_int.go
- ip4_port_string.go
- ip4_port_uint.go
- ip_slice.go
- ipmask.go
- ipnet.go
- ipnet_slice.go
- mongo_read_pref_mode.go
- mongo_tag_set.go
- mongo_tag_set_slice.go
- promhttp_handler_error_handling.go
- string.go
- string_array.go
- string_slice.go
- string_to_float32.go
- string_to_float64.go
- string_to_int.go
- string_to_int32.go
- string_to_int64.go
- string_to_string.go
- uint.go
- uint16.go
- uint32.go
- uint64.go
- uint8.go
- uint_slice.go
- zipkin_extract_failure_policy.go
- zipkin_generator.go