forked from TrueCloudLab/rclone
Update dependencies pre release
This commit is contained in:
parent
f7af730b50
commit
b83f7ac06b
126 changed files with 5782 additions and 19795 deletions
22
vendor/github.com/spf13/cobra/command.go
generated
vendored
22
vendor/github.com/spf13/cobra/command.go
generated
vendored
|
@ -231,12 +231,8 @@ func (c *Command) Usage() error {
|
|||
// HelpFunc returns either the function set by SetHelpFunc for this command
|
||||
// or a parent, or it returns a function with default help behavior.
|
||||
func (c *Command) HelpFunc() func(*Command, []string) {
|
||||
cmd := c
|
||||
for cmd != nil {
|
||||
if cmd.helpFunc != nil {
|
||||
return cmd.helpFunc
|
||||
}
|
||||
cmd = cmd.parent
|
||||
if helpFunc := c.checkHelpFunc(); helpFunc != nil {
|
||||
return helpFunc
|
||||
}
|
||||
return func(*Command, []string) {
|
||||
c.mergePersistentFlags()
|
||||
|
@ -247,6 +243,20 @@ func (c *Command) HelpFunc() func(*Command, []string) {
|
|||
}
|
||||
}
|
||||
|
||||
// checkHelpFunc checks if there is helpFunc in ancestors of c.
|
||||
func (c *Command) checkHelpFunc() func(*Command, []string) {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
if c.helpFunc != nil {
|
||||
return c.helpFunc
|
||||
}
|
||||
if c.HasParent() {
|
||||
return c.parent.checkHelpFunc()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Help puts out the help for the command.
|
||||
// Used when a user calls help [command].
|
||||
// Can be defined by user by overriding HelpFunc.
|
||||
|
|
3
vendor/github.com/spf13/pflag/.travis.yml
generated
vendored
3
vendor/github.com/spf13/pflag/.travis.yml
generated
vendored
|
@ -3,9 +3,8 @@ sudo: false
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.5.4
|
||||
- 1.6.3
|
||||
- 1.7
|
||||
- 1.7.3
|
||||
- tip
|
||||
|
||||
matrix:
|
||||
|
|
4
vendor/github.com/spf13/pflag/flag.go
generated
vendored
4
vendor/github.com/spf13/pflag/flag.go
generated
vendored
|
@ -514,7 +514,7 @@ func (f *FlagSet) FlagUsages() string {
|
|||
if len(flag.NoOptDefVal) > 0 {
|
||||
switch flag.Value.Type() {
|
||||
case "string":
|
||||
line += fmt.Sprintf("[=%q]", flag.NoOptDefVal)
|
||||
line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
|
||||
case "bool":
|
||||
if flag.NoOptDefVal != "true" {
|
||||
line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
|
||||
|
@ -534,7 +534,7 @@ func (f *FlagSet) FlagUsages() string {
|
|||
line += usage
|
||||
if !flag.defaultIsZeroValue() {
|
||||
if flag.Value.Type() == "string" {
|
||||
line += fmt.Sprintf(" (default %q)", flag.DefValue)
|
||||
line += fmt.Sprintf(" (default \"%s\")", flag.DefValue)
|
||||
} else {
|
||||
line += fmt.Sprintf(" (default %s)", flag.DefValue)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue