Skip to content

Commit

Permalink
[chore] tidy code to return directly (open-telemetry#9751)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored and tomasmota committed Mar 14, 2024
1 parent 92992c5 commit bae5867
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/mdatagen/loader.go
Expand Up @@ -124,11 +124,7 @@ func (m *metric) Unmarshal(parser *confmap.Conf) error {
if !parser.IsSet("enabled") {
return errors.New("missing required field: `enabled`")
}
err := parser.Unmarshal(m)
if err != nil {
return err
}
return nil
return parser.Unmarshal(m)
}
func (m metric) Data() MetricData {
if m.Sum != nil {
Expand Down

0 comments on commit bae5867

Please sign in to comment.