From 139d378d1aaf47c1b82a254c6ea57966b2a75d3d Mon Sep 17 00:00:00 2001 From: Rudi Date: Fri, 15 Sep 2023 13:11:06 -0400 Subject: [PATCH] Remove deprecated io/ioutil import and calls --- config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index e3acd1a..9460950 100644 --- a/config.go +++ b/config.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "net/url" "os" @@ -16,7 +15,7 @@ import ( func loadConfig() { var c Config - confFile, _ := ioutil.ReadFile(configFile) + confFile, _ := os.ReadFile(configFile) err := json.Unmarshal([]byte(confFile), &c) if err != nil { log.LogErrorType(err) @@ -52,7 +51,7 @@ func saveConfig() { if err != nil { log.LogErrorType(err) } - err = ioutil.WriteFile(configFile, file, 0600) + err = os.WriteFile(configFile, file, 0600) if err != nil { log.LogErrorType(err) }