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
}
defer reader.Close()
buf, err := io.ReadAll(reader)
if err != nil {
return err
@ -223,7 +223,7 @@ func mergeSetFlag(configElemValue reflect.Value, setValues []string) error {
}
if len(setErrors) > 0 {
return fmt.Errorf(strings.Join(setErrors, "\n"))
return errors.New(strings.Join(setErrors, "\n"))
}
return nil