Rebase main, update flag-spec.yaml to add Action field
This commit is contained in:
parent
f9ceca5dfa
commit
d213683bee
@ -1,5 +1,3 @@
|
|||||||
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
|
|
||||||
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
@ -10,7 +8,6 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
|
|||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
@ -9,47 +9,77 @@ flag_types:
|
|||||||
- name: Count
|
- name: Count
|
||||||
type: int
|
type: int
|
||||||
pointer: true
|
pointer: true
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, bool) error"
|
||||||
float64:
|
float64:
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, float64) error"
|
||||||
Float64Slice:
|
Float64Slice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
- fmt.Stringer
|
- fmt.Stringer
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []float64) error"
|
||||||
int:
|
int:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: Base
|
- name: Base
|
||||||
type: int
|
type: int
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, int) error"
|
||||||
IntSlice:
|
IntSlice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
- fmt.Stringer
|
- fmt.Stringer
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []int) error"
|
||||||
int64:
|
int64:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: Base
|
- name: Base
|
||||||
type: int
|
type: int
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, int64) error"
|
||||||
Int64Slice:
|
Int64Slice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
- fmt.Stringer
|
- fmt.Stringer
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []int64) error"
|
||||||
uint:
|
uint:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: Base
|
- name: Base
|
||||||
type: int
|
type: int
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, uint) error"
|
||||||
UintSlice:
|
UintSlice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
- fmt.Stringer
|
- fmt.Stringer
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []uint) error"
|
||||||
uint64:
|
uint64:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: Base
|
- name: Base
|
||||||
type: int
|
type: int
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, uint64) error"
|
||||||
Uint64Slice:
|
Uint64Slice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
- fmt.Stringer
|
- fmt.Stringer
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []uint64) error"
|
||||||
string:
|
string:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: TakesFile
|
- name: TakesFile
|
||||||
type: bool
|
type: bool
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, string) error"
|
||||||
StringSlice:
|
StringSlice:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
skip_interfaces:
|
skip_interfaces:
|
||||||
@ -57,7 +87,12 @@ flag_types:
|
|||||||
struct_fields:
|
struct_fields:
|
||||||
- name: TakesFile
|
- name: TakesFile
|
||||||
type: bool
|
type: bool
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, []string) error"
|
||||||
time.Duration:
|
time.Duration:
|
||||||
|
struct_fields:
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, time.Duration) error"
|
||||||
Timestamp:
|
Timestamp:
|
||||||
value_pointer: true
|
value_pointer: true
|
||||||
struct_fields:
|
struct_fields:
|
||||||
@ -65,12 +100,18 @@ flag_types:
|
|||||||
type: string
|
type: string
|
||||||
- name: Timezone
|
- name: Timezone
|
||||||
type: "*time.Location"
|
type: "*time.Location"
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, *time.Time) error"
|
||||||
Generic:
|
Generic:
|
||||||
no_destination_pointer: true
|
no_destination_pointer: true
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: TakesFile
|
- name: TakesFile
|
||||||
type: bool
|
type: bool
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, interface{}) error"
|
||||||
Path:
|
Path:
|
||||||
struct_fields:
|
struct_fields:
|
||||||
- name: TakesFile
|
- name: TakesFile
|
||||||
type: bool
|
type: bool
|
||||||
|
- name: Action
|
||||||
|
type: "func(*Context, Path) error"
|
||||||
|
@ -22,6 +22,8 @@ type Float64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []float64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -92,6 +94,8 @@ type GenericFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, interface{}) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -165,6 +169,8 @@ type Int64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -233,6 +239,8 @@ type IntSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []int) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -303,6 +311,8 @@ type PathFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, Path) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -370,6 +380,8 @@ type StringSliceFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, []string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -442,6 +454,8 @@ type TimestampFlag struct {
|
|||||||
Layout string
|
Layout string
|
||||||
|
|
||||||
Timezone *time.Location
|
Timezone *time.Location
|
||||||
|
|
||||||
|
Action func(*Context, *time.Time) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -515,6 +529,8 @@ type Uint64SliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -555,6 +571,8 @@ type UintSliceFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, []uint) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns whether or not the flag has been set through env or file
|
// IsSet returns whether or not the flag has been set through env or file
|
||||||
@ -597,6 +615,8 @@ type BoolFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Count *int
|
Count *int
|
||||||
|
|
||||||
|
Action func(*Context, bool) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -662,6 +682,8 @@ type Float64Flag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, float64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -737,6 +759,8 @@ type IntFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -812,6 +836,8 @@ type Int64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, int64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -887,6 +913,8 @@ type StringFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
|
||||||
|
Action func(*Context, string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -952,6 +980,8 @@ type DurationFlag struct {
|
|||||||
|
|
||||||
Aliases []string
|
Aliases []string
|
||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
|
Action func(*Context, time.Duration) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -1027,6 +1057,8 @@ type UintFlag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
@ -1102,6 +1134,8 @@ type Uint64Flag struct {
|
|||||||
EnvVars []string
|
EnvVars []string
|
||||||
|
|
||||||
Base int
|
Base int
|
||||||
|
|
||||||
|
Action func(*Context, uint64) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a readable representation of this value (for usage defaults)
|
// String returns a readable representation of this value (for usage defaults)
|
||||||
|
Loading…
Reference in New Issue
Block a user