1
0
Fork 0
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:
Vincent Batts 2024-06-11 16:52:57 +00:00
parent d54530a564
commit 4fdc2fd3ed
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
121 changed files with 9984 additions and 4436 deletions

View file

@ -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 {