refactor: interface{} -> any

feat: 新增外链菜单
This commit is contained in:
meilin.huang
2023-06-01 12:31:32 +08:00
parent 9900b236ef
commit 17d96acceb
106 changed files with 316 additions and 312 deletions

View File

@@ -8,7 +8,7 @@ import (
)
// 从指定路径加载yaml文件
func LoadYml(path string, out interface{}) error {
func LoadYml(path string, out any) error {
yamlFileBytes, readErr := os.ReadFile(path)
if readErr != nil {
return readErr
@@ -21,7 +21,7 @@ func LoadYml(path string, out interface{}) error {
return nil
}
func LoadYmlByString(yamlStr string, out interface{}) error {
func LoadYmlByString(yamlStr string, out any) error {
// yaml解析
return yaml.Unmarshal([]byte(yamlStr), out)
}