From 0437ec855a5e3e16f4160e339d039f4d1ad31543 Mon Sep 17 00:00:00 2001 From: Yoshiaki SENDA Date: Wed, 10 Nov 2021 05:56:16 +0900 Subject: [PATCH] Fix lint error: Add error check to defaults.Set (#2) --- internal/pkg/warewulfconf/datastructure.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/pkg/warewulfconf/datastructure.go b/internal/pkg/warewulfconf/datastructure.go index 4d0caf72..c69ffdcc 100644 --- a/internal/pkg/warewulfconf/datastructure.go +++ b/internal/pkg/warewulfconf/datastructure.go @@ -51,7 +51,9 @@ type NfsConf struct { } func (s *NfsConf) UnmarshalYAML(unmarshal func(interface{}) error) error { - defaults.Set(s) + if err := defaults.Set(s); err != nil { + return err + } type plain NfsConf if err := unmarshal((*plain)(s)); err != nil {