Rebase main, update flag-spec.yaml to add Action field

main
Wendell Sun 2 years ago committed by Dan Buch
parent f9ceca5dfa
commit d213683bee
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -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/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
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=
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/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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

@ -9,47 +9,77 @@ flag_types:
- name: Count
type: int
pointer: true
- name: Action
type: "func(*Context, bool) error"
float64:
struct_fields:
- name: Action
type: "func(*Context, float64) error"
Float64Slice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- name: Action
type: "func(*Context, []float64) error"
int:
struct_fields:
- name: Base
type: int
- name: Action
type: "func(*Context, int) error"
IntSlice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- name: Action
type: "func(*Context, []int) error"
int64:
struct_fields:
- name: Base
type: int
- name: Action
type: "func(*Context, int64) error"
Int64Slice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- name: Action
type: "func(*Context, []int64) error"
uint:
struct_fields:
- name: Base
type: int
- name: Action
type: "func(*Context, uint) error"
UintSlice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- name: Action
type: "func(*Context, []uint) error"
uint64:
struct_fields:
- name: Base
type: int
- name: Action
type: "func(*Context, uint64) error"
Uint64Slice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- name: Action
type: "func(*Context, []uint64) error"
string:
struct_fields:
- name: TakesFile
type: bool
- name: Action
type: "func(*Context, string) error"
StringSlice:
value_pointer: true
skip_interfaces:
@ -57,7 +87,12 @@ flag_types:
struct_fields:
- name: TakesFile
type: bool
- name: Action
type: "func(*Context, []string) error"
time.Duration:
struct_fields:
- name: Action
type: "func(*Context, time.Duration) error"
Timestamp:
value_pointer: true
struct_fields:
@ -65,12 +100,18 @@ flag_types:
type: string
- name: Timezone
type: "*time.Location"
- name: Action
type: "func(*Context, *time.Time) error"
Generic:
no_destination_pointer: true
struct_fields:
- name: TakesFile
type: bool
- name: Action
type: "func(*Context, interface{}) error"
Path:
struct_fields:
- name: TakesFile
type: bool
- name: Action
type: "func(*Context, Path) error"

@ -22,6 +22,8 @@ type Float64SliceFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, []float64) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -92,6 +94,8 @@ type GenericFlag struct {
EnvVars []string
TakesFile bool
Action func(*Context, interface{}) error
}
// String returns a readable representation of this value (for usage defaults)
@ -165,6 +169,8 @@ type Int64SliceFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, []int64) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -233,6 +239,8 @@ type IntSliceFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, []int) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -303,6 +311,8 @@ type PathFlag struct {
EnvVars []string
TakesFile bool
Action func(*Context, Path) error
}
// String returns a readable representation of this value (for usage defaults)
@ -370,6 +380,8 @@ type StringSliceFlag struct {
EnvVars []string
TakesFile bool
Action func(*Context, []string) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -442,6 +454,8 @@ type TimestampFlag struct {
Layout string
Timezone *time.Location
Action func(*Context, *time.Time) error
}
// String returns a readable representation of this value (for usage defaults)
@ -515,6 +529,8 @@ type Uint64SliceFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, []uint64) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -555,6 +571,8 @@ type UintSliceFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, []uint) error
}
// IsSet returns whether or not the flag has been set through env or file
@ -597,6 +615,8 @@ type BoolFlag struct {
EnvVars []string
Count *int
Action func(*Context, bool) error
}
// String returns a readable representation of this value (for usage defaults)
@ -662,6 +682,8 @@ type Float64Flag struct {
Aliases []string
EnvVars []string
Action func(*Context, float64) error
}
// String returns a readable representation of this value (for usage defaults)
@ -737,6 +759,8 @@ type IntFlag struct {
EnvVars []string
Base int
Action func(*Context, int) error
}
// String returns a readable representation of this value (for usage defaults)
@ -812,6 +836,8 @@ type Int64Flag struct {
EnvVars []string
Base int
Action func(*Context, int64) error
}
// String returns a readable representation of this value (for usage defaults)
@ -887,6 +913,8 @@ type StringFlag struct {
EnvVars []string
TakesFile bool
Action func(*Context, string) error
}
// String returns a readable representation of this value (for usage defaults)
@ -952,6 +980,8 @@ type DurationFlag struct {
Aliases []string
EnvVars []string
Action func(*Context, time.Duration) error
}
// String returns a readable representation of this value (for usage defaults)
@ -1027,6 +1057,8 @@ type UintFlag struct {
EnvVars []string
Base int
Action func(*Context, uint) error
}
// String returns a readable representation of this value (for usage defaults)
@ -1102,6 +1134,8 @@ type Uint64Flag struct {
EnvVars []string
Base int
Action func(*Context, uint64) error
}
// String returns a readable representation of this value (for usage defaults)

Loading…
Cancel
Save