Skip to content

Commit

Permalink
[chore] [cmd/mdatagen] Remove unused (md *metadata) Unmarshal func (o…
Browse files Browse the repository at this point in the history
…pen-telemetry#23575)

This func is not used. Because the receiver is the metadata struct, it
would need to be called directly.

This also tests field Name -- which does not exist anymore (replaced by
Type).

**Note:** Validation of Type will be done as part of open-telemetry#23424
  • Loading branch information
mackjmr authored and Caleb-Hurshman committed Jul 6, 2023
1 parent c878b1f commit 886edeb
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmd/mdatagen/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,6 @@ type metadata struct {
ScopeName string `mapstructure:"-"`
}

func (md *metadata) Unmarshal(parser *confmap.Conf) error {
if !parser.IsSet("name") {
return errors.New("missing required field: `description`")
}
err := parser.Unmarshal(md, confmap.WithErrorUnused())
if err != nil {
return err
}
return nil
}

func (md *metadata) Validate() error {
var errs error

Expand Down

0 comments on commit 886edeb

Please sign in to comment.