@ -15,6 +15,7 @@ type BoolFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Destination * bool
}
@ -29,6 +30,11 @@ func (f BoolFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f BoolFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Bool looks up the value of a local BoolFlag, returns
// false if not found
func ( c * Context ) Bool ( name string ) bool {
@ -63,6 +69,7 @@ type BoolTFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Destination * bool
}
@ -77,6 +84,11 @@ func (f BoolTFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f BoolTFlag ) GetHidden ( ) bool {
return f . Hidden
}
// BoolT looks up the value of a local BoolTFlag, returns
// false if not found
func ( c * Context ) BoolT ( name string ) bool {
@ -111,6 +123,7 @@ type DurationFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value time . Duration
Destination * time . Duration
}
@ -126,6 +139,11 @@ func (f DurationFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f DurationFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Duration looks up the value of a local DurationFlag, returns
// 0 if not found
func ( c * Context ) Duration ( name string ) time . Duration {
@ -160,6 +178,7 @@ type Float64Flag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value float64
Destination * float64
}
@ -175,6 +194,11 @@ func (f Float64Flag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f Float64Flag ) GetHidden ( ) bool {
return f . Hidden
}
// Float64 looks up the value of a local Float64Flag, returns
// 0 if not found
func ( c * Context ) Float64 ( name string ) float64 {
@ -209,6 +233,7 @@ type GenericFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value Generic
}
@ -223,6 +248,11 @@ func (f GenericFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f GenericFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Generic looks up the value of a local GenericFlag, returns
// nil if not found
func ( c * Context ) Generic ( name string ) interface { } {
@ -257,6 +287,7 @@ type Int64Flag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value int64
Destination * int64
}
@ -272,6 +303,11 @@ func (f Int64Flag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f Int64Flag ) GetHidden ( ) bool {
return f . Hidden
}
// Int64 looks up the value of a local Int64Flag, returns
// 0 if not found
func ( c * Context ) Int64 ( name string ) int64 {
@ -306,6 +342,7 @@ type IntFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value int
Destination * int
}
@ -321,6 +358,11 @@ func (f IntFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f IntFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Int looks up the value of a local IntFlag, returns
// 0 if not found
func ( c * Context ) Int ( name string ) int {
@ -355,6 +397,7 @@ type IntSliceFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value * IntSlice
}
@ -369,6 +412,11 @@ func (f IntSliceFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f IntSliceFlag ) GetHidden ( ) bool {
return f . Hidden
}
// IntSlice looks up the value of a local IntSliceFlag, returns
// nil if not found
func ( c * Context ) IntSlice ( name string ) [ ] int {
@ -403,6 +451,7 @@ type Int64SliceFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value * Int64Slice
}
@ -417,6 +466,11 @@ func (f Int64SliceFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f Int64SliceFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Int64Slice looks up the value of a local Int64SliceFlag, returns
// nil if not found
func ( c * Context ) Int64Slice ( name string ) [ ] int64 {
@ -451,6 +505,7 @@ type StringFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value string
Destination * string
}
@ -466,6 +521,11 @@ func (f StringFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f StringFlag ) GetHidden ( ) bool {
return f . Hidden
}
// String looks up the value of a local StringFlag, returns
// "" if not found
func ( c * Context ) String ( name string ) string {
@ -500,6 +560,7 @@ type StringSliceFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value * StringSlice
}
@ -514,6 +575,11 @@ func (f StringSliceFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f StringSliceFlag ) GetHidden ( ) bool {
return f . Hidden
}
// StringSlice looks up the value of a local StringSliceFlag, returns
// nil if not found
func ( c * Context ) StringSlice ( name string ) [ ] string {
@ -548,6 +614,7 @@ type Uint64Flag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value uint64
Destination * uint64
}
@ -563,6 +630,11 @@ func (f Uint64Flag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f Uint64Flag ) GetHidden ( ) bool {
return f . Hidden
}
// Uint64 looks up the value of a local Uint64Flag, returns
// 0 if not found
func ( c * Context ) Uint64 ( name string ) uint64 {
@ -597,6 +669,7 @@ type UintFlag struct {
EnvVar string
FilePath string
Hidden bool
Category string
Value uint
Destination * uint
}
@ -612,6 +685,11 @@ func (f UintFlag) GetName() string {
return f . Name
}
// GetHidden lets us know if the flag is hidden or not
func ( f UintFlag ) GetHidden ( ) bool {
return f . Hidden
}
// Uint looks up the value of a local UintFlag, returns
// 0 if not found
func ( c * Context ) Uint ( name string ) uint {