chore: ioutil 换为 os
This commit is contained in:
parent
8b29ccee17
commit
c6e6430808
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user