go-proto-validators icon indicating copy to clipboard operation
go-proto-validators copied to clipboard

could error message FieldName be json tag?

Open GerryLon opened this issue 5 years ago • 0 comments

return github_com_mwitkow_go_proto_validators.FieldError("ProjectName", fmt.Errorf(`value '%v' must not be an empty string`, this.ProjectName))
ProjectName          string   `protobuf:"bytes,3,opt,name=project_name,proto3" json:"project_name,omitempty"`

if error message's FieldName set toproject_name(from json tag) will better.

GerryLon avatar Dec 24 '20 12:12 GerryLon