From 3eb3586c0f2a4e53cf31304d4643b8380b1320d0 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 26 Jan 2024 07:08:18 +0000 Subject: [PATCH] ioutil is deprecated --- main.go | 2 +- natsapi/utils.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 361cf462..5a8eff70 100644 --- a/main.go +++ b/main.go @@ -12,7 +12,7 @@ import ( ) var ( - version = "3.5.1" + version = "3.5.2" log = logrus.New() ) diff --git a/natsapi/utils.go b/natsapi/utils.go index 8f0ad018..cdc382b1 100644 --- a/natsapi/utils.go +++ b/natsapi/utils.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "os" "github.com/jmoiron/sqlx" _ "github.com/lib/pq" @@ -20,7 +20,7 @@ func GetConfig(cfg string) (db *sqlx.DB, r DjangoConfig, err error) { } } - jret, _ := ioutil.ReadFile(cfg) + jret, _ := os.ReadFile(cfg) err = json.Unmarshal(jret, &r) if err != nil { return