Skip to content

Commit

Permalink
Remove deprecation fix from this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Jul 22, 2024
1 parent 7c5b2d5 commit 9471649
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package killgrave
import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path"

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 9471649

Please sign in to comment.