diff --git a/config/config.go b/config/config.go index e6e0020..9501570 100644 --- a/config/config.go +++ b/config/config.go @@ -2,7 +2,6 @@ package config import ( "encoding/json" - "io/ioutil" "os" "strings" @@ -35,7 +34,7 @@ func Load(l *logger.Logger) { l = l.Create("CONFIG") defer l.ChangeLevel(logger.LevelMain).Println("LOADED") initPlatform() - b, err := ioutil.ReadFile("config.json") + b, err := os.ReadFile("config.json") if err != nil { if err := ValueOf.setupEnvVars(l); err != nil { l.ChangeLevel(logger.LevelError).Println(err.Error()) diff --git a/utils/update.go b/utils/update.go index 79f494c..952b0fb 100644 --- a/utils/update.go +++ b/utils/update.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "net/http" "os" "strconv" @@ -38,7 +38,7 @@ func refreshChangelog() error { if err != nil { return err } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return err } @@ -82,7 +82,7 @@ type Update struct { } func InitUpdate(l *logger.Logger) { - b, err := ioutil.ReadFile("changelog.json") + b, err := os.ReadFile("changelog.json") if err != nil { l.ChangeLevel(logger.LevelCritical).Printlnf("Failed to open changelog.json: %s\n", err.Error()) return @@ -106,7 +106,7 @@ func CheckChanges() (*Update, bool) { if err != nil { return nil, false } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, false }