print errors after default values
This commit is contained in:
parent
b2f0878c5a
commit
ab7e9ada6f
11
envconf.go
11
envconf.go
@ -128,10 +128,21 @@ func (c *Config) Status() (ok bool) {
|
||||
err := v.parsed.err
|
||||
if err != nil {
|
||||
ok = false
|
||||
if !v.empty {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
fmt.Fprintln(os.Stderr, "")
|
||||
for _, v := range c.env {
|
||||
err := v.parsed.err
|
||||
if (err != nil) && v.empty {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user