From 886edeb6fc5c41725474ab644d139661722a7ed3 Mon Sep 17 00:00:00 2001 From: Mackenzie <63265430+mackjmr@users.noreply.github.com> Date: Tue, 20 Jun 2023 18:51:54 +0200 Subject: [PATCH] [chore] [cmd/mdatagen] Remove unused (md *metadata) Unmarshal func (#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 #23424 --- cmd/mdatagen/loader.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go index 868df8d111a8..a11aea8c453b 100644 --- a/cmd/mdatagen/loader.go +++ b/cmd/mdatagen/loader.go @@ -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