chore: ioutil 换为 os

This commit is contained in:
tiglog 2023-10-16 20:50:05 +08:00
parent 8b29ccee17
commit c6e6430808

View File

@ -9,7 +9,7 @@ package gconfig
import ( import (
"bytes" "bytes"
"io/ioutil" "os"
"text/template" "text/template"
"git.hexq.cn/tiglog/golib/gfile" "git.hexq.cn/tiglog/golib/gfile"
@ -50,7 +50,7 @@ func (c *BaseConfig) GetData(fname string, must bool) *bytes.Buffer {
return nil return nil
} }
} }
dat, err := ioutil.ReadFile(fp) dat, err := os.ReadFile(fp)
helper.CheckErr(err) helper.CheckErr(err)
tpl, err := template.New("config").Parse(string(dat)) tpl, err := template.New("config").Parse(string(dat))
helper.CheckErr(err) helper.CheckErr(err)