forked from toolshed/abra
refactor: urfave v3
This commit is contained in:
28
vendor/github.com/spf13/pflag/string_slice.go
generated
vendored
28
vendor/github.com/spf13/pflag/string_slice.go
generated
vendored
@ -98,12 +98,9 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) {
|
||||
// The argument p points to a []string variable in which to store the value of the flag.
|
||||
// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.
|
||||
// For example:
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
// will result in
|
||||
//
|
||||
// []string{"v1", "v2", "v3"}
|
||||
// []string{"v1", "v2", "v3"}
|
||||
func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) {
|
||||
f.VarP(newStringSliceValue(value, p), name, "", usage)
|
||||
}
|
||||
@ -117,12 +114,9 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s
|
||||
// The argument p points to a []string variable in which to store the value of the flag.
|
||||
// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.
|
||||
// For example:
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
// will result in
|
||||
//
|
||||
// []string{"v1", "v2", "v3"}
|
||||
// []string{"v1", "v2", "v3"}
|
||||
func StringSliceVar(p *[]string, name string, value []string, usage string) {
|
||||
CommandLine.VarP(newStringSliceValue(value, p), name, "", usage)
|
||||
}
|
||||
@ -136,12 +130,9 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage
|
||||
// The return value is the address of a []string variable that stores the value of the flag.
|
||||
// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.
|
||||
// For example:
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
// will result in
|
||||
//
|
||||
// []string{"v1", "v2", "v3"}
|
||||
// []string{"v1", "v2", "v3"}
|
||||
func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string {
|
||||
p := []string{}
|
||||
f.StringSliceVarP(&p, name, "", value, usage)
|
||||
@ -159,12 +150,9 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str
|
||||
// The return value is the address of a []string variable that stores the value of the flag.
|
||||
// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.
|
||||
// For example:
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
//
|
||||
// --ss="v1,v2" --ss="v3"
|
||||
// will result in
|
||||
//
|
||||
// []string{"v1", "v2", "v3"}
|
||||
// []string{"v1", "v2", "v3"}
|
||||
func StringSlice(name string, value []string, usage string) *[]string {
|
||||
return CommandLine.StringSliceP(name, "", value, usage)
|
||||
}
|
||||
|
Reference in New Issue
Block a user