print errors after default values
This commit is contained in:
parent
b2f0878c5a
commit
ab7e9ada6f
13
envconf.go
13
envconf.go
@ -128,7 +128,18 @@ func (c *Config) Status() (ok bool) {
|
||||
err := v.parsed.err
|
||||
if err != nil {
|
||||
ok = false
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user