1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-07-15 03:09:10 +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

@ -32,7 +32,10 @@ func (f *DurationFlag) GetDefaultText() string {
if f.DefaultText != "" {
return f.DefaultText
}
return f.defaultValue.String()
if f.defaultValueSet {
return f.defaultValue.String()
}
return f.Value.String()
}
// GetEnvVars returns the env vars for this flag
@ -44,6 +47,7 @@ func (f *DurationFlag) GetEnvVars() []string {
func (f *DurationFlag) Apply(set *flag.FlagSet) error {
// set default value so that environment wont be able to overwrite it
f.defaultValue = f.Value
f.defaultValueSet = true
if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {