# Packages
No description provided by the author
No description provided by the author
validator 参数校验器 通过标签的方式指定参数的校验方式,虽然性能有所损耗,但是能减少繁琐的参数判断 对程序代码的可读性有极大的提升 Usage:
type User struct { Name string `json:"phone" binding:"required,omitempty" comment:"名称"` Age uint `json:"age" binding:"required,min=10" comment:"年龄"` }
更多校验方式请查看:https://godoc.org/github.com/go-playground/validator.