个人认为go-zero框架未来需要新增哪些功能
自己使用go-zero有1个多月了。认为go-zero缺少的东西:
1.系统错误类型不是msg code data,通过自定义方式实现的在参数验证模块不能使用指定的语言提示,统一输出英文。
2.rpc没有提供参数验证的功能,类似protoc-gen-validategithub.com/envoyproxy/protoc-gen-v...功能。
3.model不定参数的高级查询没有相关写法。类似如下代码:
where := map[string]interface{}{}
if SearchName != "" {
where["`app_name` like "] = "%" +SearchName+ "%"
}
if comId != "" {
//WHERE `com_id`
where["`com_id` ="] = comId
}
offset := uint((Current-1)*PageSize)
end := uint(PageSize)
//where["_limit"] = []uint{(Current-1)*PageSize, PageSize}
where["_limit"] = []uint{offset, end}
query, values, err := builder.BuildSelect(m.table, where, applicationFieldNames)
if err != nil {
return nil, err
}
本作品采用《CC 协议》,转载必须注明作者和本文链接