1 Star 0 Fork 0

nggs/micro

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
api.go 448 Bytes
一键复制 编辑 原始数据 按行查看 历史
李文建 提交于 2020-04-05 00:11 +08:00 . 整合其他模块代码
package json
import (
"encoding/json"
"io/ioutil"
"os"
"gitee.com/nggs/tools/static_data"
)
func ReadJsonFile(path string, info os.FileInfo, enums []*static_data.Enum, pkg string, replaceNames map[string]string) (tbl *Table, err error) {
bs, err := ioutil.ReadFile(path)
if err != nil {
return
}
tbl = NewTable(pkg, enums)
err = json.Unmarshal(bs, tbl)
if err != nil {
return
}
err = tbl.format(info, replaceNames)
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/nggs/micro.git
git@gitee.com:nggs/micro.git
nggs
micro
micro
bac99dff65eb

搜索帮助