Fix the linter error

This commit is contained in:
M. Mert Yildiran 2024-08-14 22:53:48 +03:00
parent 219fc0a126
commit 669974d608
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -147,7 +147,7 @@ func loadConfigFile(config *ConfigStruct, silent bool) error {
ConfigFilePath = cwdConfig ConfigFilePath = cwdConfig
} }
defer reader.Close() defer reader.Close()
buf, err := io.ReadAll(reader) buf, err := io.ReadAll(reader)
if err != nil { if err != nil {
return err return err
@ -223,7 +223,7 @@ func mergeSetFlag(configElemValue reflect.Value, setValues []string) error {
} }
if len(setErrors) > 0 { if len(setErrors) > 0 {
return fmt.Errorf(strings.Join(setErrors, "\n")) return errors.New(strings.Join(setErrors, "\n"))
} }
return nil return nil