Documentation
¶
Overview ¶
Package flags is a wrapper for the default flag package. All types and functions allow checking if a flag was set.
Example:
flags.Bool("local", false, "")
flag.Parse()
flag.Lookup("local").Value.(*flags.IntType).IsSet()
Index ¶
- func Bool(name string, value bool, usage string)
- func Database(name string, value database.Database, usage string)
- func Float64(name string, value float64, usage string)
- func Int(name string, value int, usage string)
- func Int64(name string, value int64, usage string)
- func String(name string, value string, usage string)
- func Uint(name string, value uint, usage string)
- func Uint64(name string, value uint64, usage string)
- type BoolValue
- type DatabaseValue
- type Float64Value
- type Int64Value
- type IntValue
- type StringValue
- type Uint64Value
- type UintValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoolValue ¶
type BoolValue struct {
// contains filtered or unexported fields
}
func (*BoolValue) IsBoolFlag ¶
type DatabaseValue ¶
type DatabaseValue struct {
// contains filtered or unexported fields
}
func (*DatabaseValue) Get ¶
func (db *DatabaseValue) Get() interface{}
func (*DatabaseValue) IsSet ¶
func (db *DatabaseValue) IsSet() bool
func (*DatabaseValue) Set ¶
func (db *DatabaseValue) Set(s string) error
func (*DatabaseValue) String ¶
func (db *DatabaseValue) String() string
type Float64Value ¶
type Float64Value struct {
// contains filtered or unexported fields
}
func (*Float64Value) Get ¶
func (f *Float64Value) Get() interface{}
func (*Float64Value) IsSet ¶
func (f *Float64Value) IsSet() bool
func (*Float64Value) Set ¶
func (f *Float64Value) Set(s string) error
func (*Float64Value) String ¶
func (f *Float64Value) String() string
type Int64Value ¶
type Int64Value struct {
// contains filtered or unexported fields
}
func (*Int64Value) Get ¶
func (i *Int64Value) Get() interface{}
func (*Int64Value) IsSet ¶
func (i *Int64Value) IsSet() bool
func (*Int64Value) Set ¶
func (i *Int64Value) Set(s string) error
func (*Int64Value) String ¶
func (i *Int64Value) String() string
type StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
func (StringValue) Get ¶
func (s StringValue) Get() interface{}
func (StringValue) IsSet ¶
func (s StringValue) IsSet() bool
func (*StringValue) Set ¶
func (s *StringValue) Set(val string) error
func (StringValue) String ¶
func (s StringValue) String() string
type Uint64Value ¶
type Uint64Value struct {
// contains filtered or unexported fields
}
func (*Uint64Value) Get ¶
func (i *Uint64Value) Get() interface{}
func (*Uint64Value) IsSet ¶
func (i *Uint64Value) IsSet() bool
func (*Uint64Value) Set ¶
func (i *Uint64Value) Set(s string) error
func (*Uint64Value) String ¶
func (i *Uint64Value) String() string
Click to show internal directories.
Click to hide internal directories.