1 Star 0 Fork 0

蒙蒙的男孩/eosc

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.go 411 Bytes
一键复制 编辑 原始数据 按行查看 历史
蒙蒙的男孩 提交于 2024-01-10 11:57 +08:00 . 0.15.2
package setting
import "encoding/json"
type configProxy struct {
data []byte
}
func (c *configProxy) UnmarshalJSON(bytes []byte) error {
c.data = bytes
return nil
}
func splitConfig(data []byte) [][]byte {
var ps []*configProxy
err := json.Unmarshal(data, &ps)
if err != nil {
return [][]byte{data}
}
r := make([][]byte, 0, len(ps))
for _, v := range ps {
r = append(r, v.data)
}
return r
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meng_mengs_boys/eosc.git
git@gitee.com:meng_mengs_boys/eosc.git
meng_mengs_boys
eosc
eosc
v1.15.7

搜索帮助