2021年8月18日

Go语言参数校验(go-playground / validator)——基本使用

摘要: Go语言没有像Java一样的注解快速进行参数的校验,但可以通过struct tag(结构体标签)进行序列化。常用的如: type User struct { ID string `json:"id"` Name string `json:"name"` Age string `json:"age"` 阅读全文

posted @ 2021-08-18 16:11 ExplorerMan 阅读(940) 评论(0) 推荐(0) 编辑

导航