diff options
| author | Joseph Richey <joerichey94@gmail.com> | 2018-02-11 20:28:41 -0800 |
|---|---|---|
| committer | Joseph Richey <joerichey94@gmail.com> | 2018-02-11 20:28:41 -0800 |
| commit | efeda626da382177d5f1f0439b6e62b663a216a9 (patch) | |
| tree | c2660fa89e96838bc2c81189e57dc792434ec9b0 /vendor/github.com/urfave/cli/flag.go | |
| parent | 3634a7bb931862ada0bc1c4357303d7ce18e7c20 (diff) | |
vendor: update vendored dependancies
This change updates dependancies to be consistent with Gopkg.toml.
This change was generated by running "dep ensure".
Diffstat (limited to 'vendor/github.com/urfave/cli/flag.go')
| -rw-r--r-- | vendor/github.com/urfave/cli/flag.go | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/vendor/github.com/urfave/cli/flag.go b/vendor/github.com/urfave/cli/flag.go index b17f5b9..877ff35 100644 --- a/vendor/github.com/urfave/cli/flag.go +++ b/vendor/github.com/urfave/cli/flag.go @@ -37,14 +37,6 @@ var HelpFlag Flag = BoolFlag{ // to display a flag. var FlagStringer FlagStringFunc = stringifyFlag -// FlagNamePrefixer converts a full flag name and its placeholder into the help -// message flag prefix. This is used by the default FlagStringer. -var FlagNamePrefixer FlagNamePrefixFunc = prefixedNames - -// FlagEnvHinter annotates flag help message with the environment variable -// details. This is used by the default FlagStringer. -var FlagEnvHinter FlagEnvHintFunc = withEnvHint - // FlagsByName is a slice of Flag. type FlagsByName []Flag @@ -718,13 +710,13 @@ func stringifyFlag(f Flag) string { switch f.(type) { case IntSliceFlag: - return FlagEnvHinter(fv.FieldByName("EnvVar").String(), + return withEnvHint(fv.FieldByName("EnvVar").String(), stringifyIntSliceFlag(f.(IntSliceFlag))) case Int64SliceFlag: - return FlagEnvHinter(fv.FieldByName("EnvVar").String(), + return withEnvHint(fv.FieldByName("EnvVar").String(), stringifyInt64SliceFlag(f.(Int64SliceFlag))) case StringSliceFlag: - return FlagEnvHinter(fv.FieldByName("EnvVar").String(), + return withEnvHint(fv.FieldByName("EnvVar").String(), stringifyStringSliceFlag(f.(StringSliceFlag))) } @@ -752,8 +744,8 @@ func stringifyFlag(f Flag) string { usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultValueString)) - return FlagEnvHinter(fv.FieldByName("EnvVar").String(), - fmt.Sprintf("%s\t%s", FlagNamePrefixer(fv.FieldByName("Name").String(), placeholder), usageWithDefault)) + return withEnvHint(fv.FieldByName("EnvVar").String(), + fmt.Sprintf("%s\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault)) } func stringifyIntSliceFlag(f IntSliceFlag) string { @@ -803,5 +795,5 @@ func stringifySliceFlag(usage, name string, defaultVals []string) string { } usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal)) - return fmt.Sprintf("%s\t%s", FlagNamePrefixer(name, placeholder), usageWithDefault) + return fmt.Sprintf("%s\t%s", prefixedNames(name, placeholder), usageWithDefault) } |