Skip to content

Commit

Permalink
fix: log the full key if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyBucket committed Feb 29, 2024
1 parent a13dc9d commit e23485d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ func Process(prefix string, spec interface{}) error {
req := info.Tags.Get("required")
if value == "" {
if isTrue(req) {
key := info.Key
if info.Alt != "" {
key = info.Alt
}
return fmt.Errorf("required key %s missing value", key)
return fmt.Errorf("required key %s missing value", info.Key)
}
continue
}
Expand Down

0 comments on commit e23485d

Please sign in to comment.