mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-06-05 02:42:27 +00:00
go*: update modules
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
d54530a564
commit
4fdc2fd3ed
121 changed files with 9984 additions and 4436 deletions
11
vendor/github.com/urfave/cli/v2/flag_generic.go
generated
vendored
11
vendor/github.com/urfave/cli/v2/flag_generic.go
generated
vendored
|
@ -53,9 +53,15 @@ func (f *GenericFlag) GetDefaultText() string {
|
|||
if f.DefaultText != "" {
|
||||
return f.DefaultText
|
||||
}
|
||||
if f.defaultValue != nil {
|
||||
return f.defaultValue.String()
|
||||
val := f.Value
|
||||
if f.defaultValueSet {
|
||||
val = f.defaultValue
|
||||
}
|
||||
|
||||
if val != nil {
|
||||
return val.String()
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
|
@ -70,6 +76,7 @@ func (f *GenericFlag) Apply(set *flag.FlagSet) error {
|
|||
// set default value so that environment wont be able to overwrite it
|
||||
if f.Value != nil {
|
||||
f.defaultValue = &stringGeneric{value: f.Value.String()}
|
||||
f.defaultValueSet = true
|
||||
}
|
||||
|
||||
if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue