Fix lint error: Add error check to defaults.Set (#2)

This commit is contained in:
Yoshiaki SENDA
2021-11-10 05:56:16 +09:00
committed by GitHub
parent a6b432062a
commit 0437ec855a

View File

@@ -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 {