mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-24 23:05:17 +08:00
优化代码
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user