优化代码

This commit is contained in:
GoEdgeLab
2022-08-04 11:52:28 +08:00
parent 9fbcc8dca1
commit 6f8037335c
2 changed files with 5 additions and 5 deletions

View File

@@ -2,11 +2,11 @@ package configutils
import (
"gopkg.in/yaml.v3"
"io/ioutil"
"os"
)
func UnmarshalYamlFile(file string, ptr interface{}) error {
data, err := ioutil.ReadFile(file)
data, err := os.ReadFile(file)
if err != nil {
return err
}