func TestValidateEmbeddedResource(t *testing.T) { … } func TestValidate(t *testing.T) { … } type validationMatch … func required(path ...string) validationMatch { … } func invalid(path ...string) validationMatch { … } func (v validationMatch) matches(err *field.Error) bool { … }