Let's say I have following struct where valid
is for validation of struct with custom messages for each validator (specially govalidator).
type Login struct {
Email string `json:"email" valid:"required~Email is required,email~The email address provided is not valid"`
Password string `json:"password" valid:"required~Password is required,stringlength(6|40)~Password length must be between 6 and 40"`
}
After adding a few validator, line is too long and not maintainable.
I want to split into new lines but not supported by go and not compatible with reflect.StructTag.Get.
However, according to my testing, validator works with multiline struct tags but vet fails.
Short, what is the correct way to split long struct tags ?