Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionalBool ¶
OptionalBool is an bool flag that lets you to tell if the flag has been set or not, unlike flag.BoolVar(), which does not.
OptionalBool can distinguish between all three of these conditions:
$ prog -bool=true $ prog -bool=false $ prog
OptionalBool supports, but can not distinguish, this additional condition:
$ prog -bool
Like flag.BoolVar(), OptionalBool does not support these conditions:
$ prog -bool true $ prog -bool false
func (*OptionalBool) IsBoolFlag ¶
func (s *OptionalBool) IsBoolFlag() bool
func (*OptionalBool) Set ¶
func (s *OptionalBool) Set(x string) error
func (*OptionalBool) String ¶
func (s *OptionalBool) String() string
type OptionalFloat64 ¶
OptionalFloat64 is a float64 flag that lets you to tell if the flag has been set or not, unlike flag.Float64Var(), which does not.
OptionalFloat64 can distinguish between all three of these conditions:
$ prog -float64 1.1 $ prog -float64 0 $ prog
func (*OptionalFloat64) Set ¶
func (s *OptionalFloat64) Set(x string) error
func (*OptionalFloat64) String ¶
func (s *OptionalFloat64) String() string
type OptionalInt ¶
OptionalInt is an int flag that lets you to tell if the flag has been set or not, unlike flag.IntVar(), which does not.
OptionalInt can distinguish between all three of these conditions:
$ prog -int 1 $ prog -int 0 $ prog -int ""
func (*OptionalInt) Set ¶
func (s *OptionalInt) Set(x string) error
func (*OptionalInt) String ¶
func (s *OptionalInt) String() string
type OptionalInt64 ¶
OptionalInt64 is an int flag that lets you to tell if the flag has been set or not, unlike flag.Int64Var(), which does not.
OptionalInt64 can distinguish between all three of these conditions:
$ prog -int64 1 $ prog -int64 0 $ prog -int64 ""
func (*OptionalInt64) Set ¶
func (s *OptionalInt64) Set(x string) error
func (*OptionalInt64) String ¶
func (s *OptionalInt64) String() string
type OptionalString ¶
OptionalString is a string flag that lets you to tell if the flag has been set or not, unlike flag.StringVar(), which does not.
OptionalString can distinguish between all three of these conditions:
$ prog -flag foo $ prog -flag ""j $ prog
func (*OptionalString) Set ¶
func (s *OptionalString) Set(x string) error
func (*OptionalString) String ¶
func (s *OptionalString) String() string
type OptionalUint ¶
OptionalUint is an int flag that lets you to tell if the flag has been set or not, unlike flag.UintVar(), which does not.
OptionalUint can distinguish between all three of these conditions:
$ prog -uint 1 $ prog -uint 0 $ prog -uint ""
func (*OptionalUint) Set ¶
func (s *OptionalUint) Set(x string) error
func (*OptionalUint) String ¶
func (s *OptionalUint) String() string
type OptionalUint64 ¶
OptionalUint64 is an int flag that lets you to tell if the flag has been set or not, unlike flag.Uint64Var(), which does not.
OptionalUint64 can distinguish between all three of these conditions:
$ prog -uint64 1 $ prog -uint64 0 $ prog
func (*OptionalUint64) Set ¶
func (s *OptionalUint64) Set(x string) error
func (*OptionalUint64) String ¶
func (s *OptionalUint64) String() string
type StringList ¶
type StringList []string
func (*StringList) Set ¶
func (s *StringList) Set(v string) error
func (*StringList) String ¶
func (s *StringList) String() string
func (StringList) Strings ¶
func (s StringList) Strings() []string