easyjson
easyjson copied to clipboard
go vet swears to json "required" tag
There is a code:
type Register struct {
Login string `json:"login,required"`
}
After execute go vet -vettool=$$(which statictest) ./... appears error unknown JSON option "required"
May be added additional tag for this? For example:
type Register struct {
Login string `json:"login" easyjson:"required"`
}
Or use https://github.com/go-playground/validator ? Example:
type Register struct {
Login string `json:"login" validate:"required"`
}
P.S. In https://github.com/thriftrw/thriftrw-go/blob/dev/Makefile i found solution - filter errors from go vet.