Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StringFlag ¶
type StringFlag struct {
// contains filtered or unexported fields
}
StringFlag is a custom struct implementing flag.Value interface It is needed to detect whether a flag has actually been set or not since a string's nil value is "" and that could be a valid value
func NewStringFlag ¶
func NewStringFlag() StringFlag
NewStringFlag returns a new StringFlag that implements flag.Var interface. This allows us to check whether the string flag was actually set or not instead of just comparing the string to empty string
func (*StringFlag) IsSet ¶
func (s *StringFlag) IsSet() bool
IsSet indicates if whether the flag has actually been set or not
func (*StringFlag) Set ¶
func (s *StringFlag) Set(in string) error
Set implements the flag.Value interface
func (*StringFlag) String ¶
func (s *StringFlag) String() string
String implements the flag.Value interface
Click to show internal directories.
Click to hide internal directories.