ioutil is deprecated
This commit is contained in:
parent
fdde16cf56
commit
3eb3586c0f
2
main.go
2
main.go
|
@ -12,7 +12,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
version = "3.5.1"
|
version = "3.5.2"
|
||||||
log = logrus.New()
|
log = logrus.New()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"os"
|
||||||
|
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
_ "github.com/lib/pq"
|
_ "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)
|
err = json.Unmarshal(jret, &r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue