diff --git a/go.mod b/go.mod index 6394ee2e0..2156aca63 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/tdewolff/parse v2.3.4+incompatible // indirect github.com/tdewolff/test v1.0.6 // indirect github.com/tiramiseb/go-gandi v0.0.0-20200309181223-e1cf2e430b3a - github.com/urfave/cli/v2 v2.1.1 + github.com/urfave/cli/v2 v2.2.0 github.com/vultr/govultr v0.2.0 golang.org/x/crypto v0.0.0-20200320181102-891825fb96df // indirect golang.org/x/net v0.0.0-20200320220750-118fecf932d8 diff --git a/go.sum b/go.sum index d70206794..351a501b5 100644 --- a/go.sum +++ b/go.sum @@ -240,6 +240,8 @@ github.com/tiramiseb/go-gandi v0.0.0-20200309181223-e1cf2e430b3a h1:OktNmi+7LyUf github.com/tiramiseb/go-gandi v0.0.0-20200309181223-e1cf2e430b3a/go.mod h1:wevS0bE43PMSmEldbtya+tp+Ow180ftEPix8Onwh+E4= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/vultr/govultr v0.2.0 h1:CZSNNCk+PHz9hzmfH2PFGkDgc3qNetwZqtcaqL8shlg= github.com/vultr/govultr v0.2.0/go.mod h1:glSLa57Jdj5s860EEc6+DEBbb/t3aUOKnB4gVPmDVlQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/vendor/github.com/urfave/cli/v2/.gitignore b/vendor/github.com/urfave/cli/v2/.gitignore index b013e4ac6..2d5e149b4 100644 --- a/vendor/github.com/urfave/cli/v2/.gitignore +++ b/vendor/github.com/urfave/cli/v2/.gitignore @@ -3,3 +3,5 @@ node_modules/ vendor .idea +internal/*/built-example +coverage.txt diff --git a/vendor/github.com/urfave/cli/v2/README.md b/vendor/github.com/urfave/cli/v2/README.md index e7fb3d755..c9237fbc6 100644 --- a/vendor/github.com/urfave/cli/v2/README.md +++ b/vendor/github.com/urfave/cli/v2/README.md @@ -1,8 +1,6 @@ cli === -[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli) - [![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli) [![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli) [![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli) diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go index c04e9afda..d0c8f84e2 100644 --- a/vendor/github.com/urfave/cli/v2/app.go +++ b/vendor/github.com/urfave/cli/v2/app.go @@ -7,7 +7,6 @@ import ( "io" "os" "path/filepath" - "reflect" "sort" "time" ) @@ -44,8 +43,11 @@ type App struct { Flags []Flag // Boolean to enable bash completion commands EnableBashCompletion bool - // Boolean to hide built-in help command + // Boolean to hide built-in help command and help flag HideHelp bool + // Boolean to hide built-in help command but keep help flag. + // Ignored if HideHelp is true. + HideHelpCommand bool // Boolean to hide built-in version flag and the VERSION section of help HideVersion bool // categories contains the categorized commands and is populated on app startup @@ -171,7 +173,9 @@ func (a *App) Setup() { a.Commands = newCommands if a.Command(helpCommand.Name) == nil && !a.HideHelp { - a.appendCommand(helpCommand) + if !a.HideHelpCommand { + a.appendCommand(helpCommand) + } if HelpFlag != nil { a.appendFlag(HelpFlag) @@ -329,19 +333,9 @@ func (a *App) RunAndExitOnError() { // RunAsSubcommand invokes the subcommand given the context, parses ctx.Args() to // generate command-specific flags func (a *App) RunAsSubcommand(ctx *Context) (err error) { + // Setup also handles HideHelp and HideHelpCommand a.Setup() - // append help to commands - if len(a.Commands) > 0 { - if a.Command(helpCommand.Name) == nil && !a.HideHelp { - a.appendCommand(helpCommand) - - if HelpFlag != nil { - a.appendFlag(HelpFlag) - } - } - } - var newCmds []*Command for _, c := range a.Commands { if c.HelpName == "" { @@ -485,16 +479,6 @@ func (a *App) VisibleFlags() []Flag { return visibleFlags(a.Flags) } -func (a *App) hasFlag(flag Flag) bool { - for _, f := range a.Flags { - if reflect.DeepEqual(flag, f) { - return true - } - } - - return false -} - func (a *App) errWriter() io.Writer { // When the app ErrWriter is nil use the package level one. if a.ErrWriter == nil { diff --git a/vendor/github.com/urfave/cli/v2/appveyor.yml b/vendor/github.com/urfave/cli/v2/appveyor.yml deleted file mode 100644 index f1cae90b5..000000000 --- a/vendor/github.com/urfave/cli/v2/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: "{build}" - -os: Windows Server 2016 - -image: Visual Studio 2017 - -clone_folder: c:\gopath\src\github.com\urfave\cli - -cache: - - node_modules - -environment: - GOPATH: C:\gopath - GOVERSION: 1.11.x - GO111MODULE: on - GOPROXY: https://proxy.golang.org - -install: - - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% - - go version - - go env - - go get github.com/urfave/gfmrun/cmd/gfmrun - - go mod tidy - -build_script: - - go run build.go vet - - go run build.go test - - go run build.go gfmrun docs/v1/manual.md diff --git a/vendor/github.com/urfave/cli/v2/command.go b/vendor/github.com/urfave/cli/v2/command.go index db6c8024b..95840f32e 100644 --- a/vendor/github.com/urfave/cli/v2/command.go +++ b/vendor/github.com/urfave/cli/v2/command.go @@ -41,8 +41,11 @@ type Command struct { Flags []Flag // Treat all flags as normal arguments if true SkipFlagParsing bool - // Boolean to hide built-in help command + // Boolean to hide built-in help command and help flag HideHelp bool + // Boolean to hide built-in help command but keep help flag + // Ignored if HideHelp is true. + HideHelpCommand bool // Boolean to hide this command from help or completion Hidden bool // Boolean to enable short-option handling so user can combine several @@ -236,6 +239,7 @@ func (c *Command) startApp(ctx *Context) error { app.Commands = c.Subcommands app.Flags = c.Flags app.HideHelp = c.HideHelp + app.HideHelpCommand = c.HideHelpCommand app.Version = ctx.App.Version app.HideVersion = ctx.App.HideVersion diff --git a/vendor/github.com/urfave/cli/v2/context.go b/vendor/github.com/urfave/cli/v2/context.go index c0c526f41..74ed51912 100644 --- a/vendor/github.com/urfave/cli/v2/context.go +++ b/vendor/github.com/urfave/cli/v2/context.go @@ -17,7 +17,6 @@ type Context struct { App *App Command *Command shellComplete bool - setFlags map[string]bool flagSet *flag.FlagSet parentContext *Context } diff --git a/vendor/github.com/urfave/cli/v2/flag.go b/vendor/github.com/urfave/cli/v2/flag.go index ec128fd44..ad97c2d05 100644 --- a/vendor/github.com/urfave/cli/v2/flag.go +++ b/vendor/github.com/urfave/cli/v2/flag.go @@ -36,7 +36,7 @@ var VersionFlag Flag = &BoolFlag{ // HelpFlag prints the help for all commands and subcommands. // Set to nil to disable the flag. The subcommand -// will still be added unless HideHelp is set to true. +// will still be added unless HideHelp or HideHelpCommand is set to true. var HelpFlag Flag = &BoolFlag{ Name: "help", Aliases: []string{"h"}, @@ -203,12 +203,9 @@ func withEnvHint(envVars []string, str string) string { return str + envText } -func flagNames(f Flag) []string { +func flagNames(name string, aliases []string) []string { var ret []string - name := flagStringField(f, "Name") - aliases := flagStringSliceField(f, "Aliases") - for _, part := range append([]string{name}, aliases...) { // v1 -> v2 migration warning zone: // Strip off anything after the first found comma or space, which @@ -231,17 +228,6 @@ func flagStringSliceField(f Flag, name string) []string { return []string{} } -func flagStringField(f Flag, name string) string { - fv := flagValue(f) - field := fv.FieldByName(name) - - if field.IsValid() { - return field.String() - } - - return "" -} - func withFileHint(filePath, str string) string { fileText := "" if filePath != "" { @@ -258,22 +244,26 @@ func flagValue(f Flag) reflect.Value { return fv } +func formatDefault(format string) string { + return " (default: " + format + ")" +} + func stringifyFlag(f Flag) string { fv := flagValue(f) - switch f.(type) { + switch f := f.(type) { case *IntSliceFlag: return withEnvHint(flagStringSliceField(f, "EnvVars"), - stringifyIntSliceFlag(f.(*IntSliceFlag))) + stringifyIntSliceFlag(f)) case *Int64SliceFlag: return withEnvHint(flagStringSliceField(f, "EnvVars"), - stringifyInt64SliceFlag(f.(*Int64SliceFlag))) + stringifyInt64SliceFlag(f)) case *Float64SliceFlag: return withEnvHint(flagStringSliceField(f, "EnvVars"), - stringifyFloat64SliceFlag(f.(*Float64SliceFlag))) + stringifyFloat64SliceFlag(f)) case *StringSliceFlag: return withEnvHint(flagStringSliceField(f, "EnvVars"), - stringifyStringSliceFlag(f.(*StringSliceFlag))) + stringifyStringSliceFlag(f)) } placeholder, usage := unquoteUsage(fv.FieldByName("Usage").String()) @@ -283,20 +273,20 @@ func stringifyFlag(f Flag) string { val := fv.FieldByName("Value") if val.IsValid() { needsPlaceholder = val.Kind() != reflect.Bool - defaultValueString = fmt.Sprintf(" (default: %v)", val.Interface()) + defaultValueString = fmt.Sprintf(formatDefault("%v"), val.Interface()) if val.Kind() == reflect.String && val.String() != "" { - defaultValueString = fmt.Sprintf(" (default: %q)", val.String()) + defaultValueString = fmt.Sprintf(formatDefault("%q"), val.String()) } } helpText := fv.FieldByName("DefaultText") if helpText.IsValid() && helpText.String() != "" { needsPlaceholder = val.Kind() != reflect.Bool - defaultValueString = fmt.Sprintf(" (default: %s)", helpText.String()) + defaultValueString = fmt.Sprintf(formatDefault("%s"), helpText.String()) } - if defaultValueString == " (default: )" { + if defaultValueString == formatDefault("") { defaultValueString = "" } @@ -365,7 +355,7 @@ func stringifySliceFlag(usage string, names, defaultVals []string) string { defaultVal := "" if len(defaultVals) > 0 { - defaultVal = fmt.Sprintf(" (default: %s)", strings.Join(defaultVals, ", ")) + defaultVal = fmt.Sprintf(formatDefault("%s"), strings.Join(defaultVals, ", ")) } usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal)) diff --git a/vendor/github.com/urfave/cli/v2/flag_bool.go b/vendor/github.com/urfave/cli/v2/flag_bool.go index 6a1da61ef..bc9ea35d0 100644 --- a/vendor/github.com/urfave/cli/v2/flag_bool.go +++ b/vendor/github.com/urfave/cli/v2/flag_bool.go @@ -34,7 +34,7 @@ func (f *BoolFlag) String() string { // Names returns the names of the flag func (f *BoolFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_duration.go b/vendor/github.com/urfave/cli/v2/flag_duration.go index 2c34944a4..22a2e6720 100644 --- a/vendor/github.com/urfave/cli/v2/flag_duration.go +++ b/vendor/github.com/urfave/cli/v2/flag_duration.go @@ -34,7 +34,7 @@ func (f *DurationFlag) String() string { // Names returns the names of the flag func (f *DurationFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_float64.go b/vendor/github.com/urfave/cli/v2/flag_float64.go index 31f06f35e..91c778c87 100644 --- a/vendor/github.com/urfave/cli/v2/flag_float64.go +++ b/vendor/github.com/urfave/cli/v2/flag_float64.go @@ -34,7 +34,7 @@ func (f *Float64Flag) String() string { // Names returns the names of the flag func (f *Float64Flag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_float64_slice.go b/vendor/github.com/urfave/cli/v2/flag_float64_slice.go index 91d2e9d10..706ee6cd4 100644 --- a/vendor/github.com/urfave/cli/v2/flag_float64_slice.go +++ b/vendor/github.com/urfave/cli/v2/flag_float64_slice.go @@ -90,7 +90,7 @@ func (f *Float64SliceFlag) String() string { // Names returns the names of the flag func (f *Float64SliceFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required @@ -155,11 +155,9 @@ func (c *Context) Float64Slice(name string) []float64 { func lookupFloat64Slice(name string, set *flag.FlagSet) []float64 { f := set.Lookup(name) if f != nil { - parsed, err := (f.Value.(*Float64Slice)).Value(), error(nil) - if err != nil { - return nil + if slice, ok := f.Value.(*Float64Slice); ok { + return slice.Value() } - return parsed } return nil } diff --git a/vendor/github.com/urfave/cli/v2/flag_generic.go b/vendor/github.com/urfave/cli/v2/flag_generic.go index 2d9baa78d..b0c8ff44d 100644 --- a/vendor/github.com/urfave/cli/v2/flag_generic.go +++ b/vendor/github.com/urfave/cli/v2/flag_generic.go @@ -39,7 +39,7 @@ func (f *GenericFlag) String() string { // Names returns the names of the flag func (f *GenericFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_int.go b/vendor/github.com/urfave/cli/v2/flag_int.go index be961bf5f..ac39d4a9e 100644 --- a/vendor/github.com/urfave/cli/v2/flag_int.go +++ b/vendor/github.com/urfave/cli/v2/flag_int.go @@ -34,7 +34,7 @@ func (f *IntFlag) String() string { // Names returns the names of the flag func (f *IntFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_int64.go b/vendor/github.com/urfave/cli/v2/flag_int64.go index c979119f8..e09991269 100644 --- a/vendor/github.com/urfave/cli/v2/flag_int64.go +++ b/vendor/github.com/urfave/cli/v2/flag_int64.go @@ -34,7 +34,7 @@ func (f *Int64Flag) String() string { // Names returns the names of the flag func (f *Int64Flag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_int64_slice.go b/vendor/github.com/urfave/cli/v2/flag_int64_slice.go index 41aa0667e..6c7fd9376 100644 --- a/vendor/github.com/urfave/cli/v2/flag_int64_slice.go +++ b/vendor/github.com/urfave/cli/v2/flag_int64_slice.go @@ -91,7 +91,7 @@ func (f *Int64SliceFlag) String() string { // Names returns the names of the flag func (f *Int64SliceFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required @@ -151,11 +151,9 @@ func (c *Context) Int64Slice(name string) []int64 { func lookupInt64Slice(name string, set *flag.FlagSet) []int64 { f := set.Lookup(name) if f != nil { - parsed, err := (f.Value.(*Int64Slice)).Value(), error(nil) - if err != nil { - return nil + if slice, ok := f.Value.(*Int64Slice); ok { + return slice.Value() } - return parsed } return nil } diff --git a/vendor/github.com/urfave/cli/v2/flag_int_slice.go b/vendor/github.com/urfave/cli/v2/flag_int_slice.go index 938897842..4e0afc021 100644 --- a/vendor/github.com/urfave/cli/v2/flag_int_slice.go +++ b/vendor/github.com/urfave/cli/v2/flag_int_slice.go @@ -102,7 +102,7 @@ func (f *IntSliceFlag) String() string { // Names returns the names of the flag func (f *IntSliceFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required @@ -165,11 +165,9 @@ func (c *Context) IntSlice(name string) []int { func lookupIntSlice(name string, set *flag.FlagSet) []int { f := set.Lookup(name) if f != nil { - parsed, err := (f.Value.(*IntSlice)).Value(), error(nil) - if err != nil { - return nil + if slice, ok := f.Value.(*IntSlice); ok { + return slice.Value() } - return parsed } return nil } diff --git a/vendor/github.com/urfave/cli/v2/flag_path.go b/vendor/github.com/urfave/cli/v2/flag_path.go index a32285739..8070dc4b0 100644 --- a/vendor/github.com/urfave/cli/v2/flag_path.go +++ b/vendor/github.com/urfave/cli/v2/flag_path.go @@ -30,7 +30,7 @@ func (f *PathFlag) String() string { // Names returns the names of the flag func (f *PathFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_string.go b/vendor/github.com/urfave/cli/v2/flag_string.go index bcd82530c..400bb532e 100644 --- a/vendor/github.com/urfave/cli/v2/flag_string.go +++ b/vendor/github.com/urfave/cli/v2/flag_string.go @@ -31,7 +31,7 @@ func (f *StringFlag) String() string { // Names returns the names of the flag func (f *StringFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_string_slice.go b/vendor/github.com/urfave/cli/v2/flag_string_slice.go index a114a495e..ac363bf60 100644 --- a/vendor/github.com/urfave/cli/v2/flag_string_slice.go +++ b/vendor/github.com/urfave/cli/v2/flag_string_slice.go @@ -71,6 +71,7 @@ type StringSliceFlag struct { Value *StringSlice DefaultText string HasBeenSet bool + Destination *StringSlice } // IsSet returns whether or not the flag has been set through env or file @@ -86,7 +87,7 @@ func (f *StringSliceFlag) String() string { // Names returns the names of the flag func (f *StringSliceFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required @@ -117,13 +118,20 @@ func (f *StringSliceFlag) GetValue() string { func (f *StringSliceFlag) Apply(set *flag.FlagSet) error { if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok { f.Value = &StringSlice{} + destination := f.Value + if f.Destination != nil { + destination = f.Destination + } for _, s := range strings.Split(val, ",") { - if err := f.Value.Set(strings.TrimSpace(s)); err != nil { + if err := destination.Set(strings.TrimSpace(s)); err != nil { return fmt.Errorf("could not parse %q as string value for flag %s: %s", val, f.Name, err) } } + // Set this to false so that we reset the slice if we then set values from + // flags that have already been set by the environment. + destination.hasBeenSet = false f.HasBeenSet = true } @@ -131,6 +139,12 @@ func (f *StringSliceFlag) Apply(set *flag.FlagSet) error { if f.Value == nil { f.Value = &StringSlice{} } + + if f.Destination != nil { + set.Var(f.Destination, name, f.Usage) + continue + } + set.Var(f.Value, name, f.Usage) } @@ -149,11 +163,9 @@ func (c *Context) StringSlice(name string) []string { func lookupStringSlice(name string, set *flag.FlagSet) []string { f := set.Lookup(name) if f != nil { - parsed, err := (f.Value.(*StringSlice)).Value(), error(nil) - if err != nil { - return nil + if slice, ok := f.Value.(*StringSlice); ok { + return slice.Value() } - return parsed } return nil } diff --git a/vendor/github.com/urfave/cli/v2/flag_timestamp.go b/vendor/github.com/urfave/cli/v2/flag_timestamp.go index d24edcd7f..9fac1d1e2 100644 --- a/vendor/github.com/urfave/cli/v2/flag_timestamp.go +++ b/vendor/github.com/urfave/cli/v2/flag_timestamp.go @@ -86,7 +86,7 @@ func (f *TimestampFlag) String() string { // Names returns the names of the flag func (f *TimestampFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_uint.go b/vendor/github.com/urfave/cli/v2/flag_uint.go index 9f592388f..2e5e76b0e 100644 --- a/vendor/github.com/urfave/cli/v2/flag_uint.go +++ b/vendor/github.com/urfave/cli/v2/flag_uint.go @@ -34,7 +34,7 @@ func (f *UintFlag) String() string { // Names returns the names of the flag func (f *UintFlag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/flag_uint64.go b/vendor/github.com/urfave/cli/v2/flag_uint64.go index 5bbd1fa4b..8fc3289d8 100644 --- a/vendor/github.com/urfave/cli/v2/flag_uint64.go +++ b/vendor/github.com/urfave/cli/v2/flag_uint64.go @@ -34,7 +34,7 @@ func (f *Uint64Flag) String() string { // Names returns the names of the flag func (f *Uint64Flag) Names() []string { - return flagNames(f) + return flagNames(f.Name, f.Aliases) } // IsRequired returns whether or not the flag is required diff --git a/vendor/github.com/urfave/cli/v2/template.go b/vendor/github.com/urfave/cli/v2/template.go index 1cc4bd624..aee3e0494 100644 --- a/vendor/github.com/urfave/cli/v2/template.go +++ b/vendor/github.com/urfave/cli/v2/template.go @@ -56,10 +56,13 @@ OPTIONS: // cli.go uses text/template to render templates. You can // render custom help text by setting this variable. var SubcommandHelpTemplate = `NAME: - {{.HelpName}} - {{if .Description}}{{.Description}}{{else}}{{.Usage}}{{end}} + {{.HelpName}} - {{.Usage}} USAGE: - {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}} + {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}} + +DESCRIPTION: + {{.Description}}{{end}} COMMANDS:{{range .VisibleCategories}}{{if .Name}} {{.Name}}:{{range .VisibleCommands}} @@ -71,9 +74,7 @@ OPTIONS: {{end}}{{end}} ` -var MarkdownDocTemplate = `% {{ .App.Name }}(8){{ if .App.Description }} {{ .App.Description }}{{ end }} -{{ range $a := .App.Authors }} -% {{ $a }}{{ end }} +var MarkdownDocTemplate = `% {{ .App.Name }} 8 # NAME diff --git a/vendor/modules.txt b/vendor/modules.txt index e81b892a1..c629b7d82 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -287,7 +287,7 @@ github.com/tiramiseb/go-gandi github.com/tiramiseb/go-gandi/domain github.com/tiramiseb/go-gandi/internal/client github.com/tiramiseb/go-gandi/livedns -# github.com/urfave/cli/v2 v2.1.1 +# github.com/urfave/cli/v2 v2.2.0 ## explicit github.com/urfave/cli/v2 # github.com/vultr/govultr v0.2.0