diff --git a/internal/config.go b/internal/config.go index cdb620e..e76a889 100644 --- a/internal/config.go +++ b/internal/config.go @@ -3,7 +3,7 @@ package killgrave import ( "errors" "fmt" - "io" + "io/ioutil" "os" "path" @@ -150,10 +150,7 @@ func NewConfigFromFile(cfgPath string) (Config, error) { defer configFile.Close() var cfg Config - bytes, err := io.ReadAll(configFile) - if err != nil { - return Config{}, fmt.Errorf("%w: error while reading configFile file %s, using default configuration instead", err, cfgPath) - } + bytes, err := ioutil.ReadAll(configFile) if err := yaml.Unmarshal(bytes, &cfg); err != nil { return Config{}, fmt.Errorf("%w: error while unmarshalling configFile file %s, using default configuration instead", err, cfgPath) }