From dbd4701a4b12519ba3126b38e158258ce2db03b3 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..9299cd1 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, _ := 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) }