Skip to content

Commit

Permalink
config: fix 'Extra' oversight wrt 'nil' vs empty map
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Renatus <stephan@styra.com>
  • Loading branch information
srenatus committed Jun 28, 2023
1 parent b470a20 commit fd32a41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func ParseConfig(raw []byte, id string) (*Config, error) {
delete(result.Extra, key)
}
}
if len(result.Extra) == 0 {
result.Extra = nil
}
return &result, result.validateAndInjectDefaults(id)
}

Expand Down

0 comments on commit fd32a41

Please sign in to comment.