zhoushuguang / beyond

Based on the go-zero framework of large-scale microservices practical project, see all say yes!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

引入Validator 自动校验请求参数

Alan-MQ opened this issue · comments

现在的接口逻辑中参数校验需要手动校验 比如
if len(req.Password) == 0 { return nil, code.RegisterPasswdEmpty }

可以引入 Validator 通过tag来作这些事情吗? up 可以来讨论下吗? 合适的话我可以做这个~~