From 9471649cd91a75961d49128f8df02d91e8da8604 Mon Sep 17 00:00:00 2001 From: Tate Exon Date: Mon, 22 Jul 2024 13:06:08 -0600 Subject: [PATCH] Remove deprecation fix from this PR --- internal/config.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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) }