Skip to content
Snippets Groups Projects
Commit d296983c authored by renovate_bot's avatar renovate_bot Committed by Fabian Seidl
Browse files

[renovate] Update module...

[renovate] Update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.35.2-20241127180247-a33202765966.1

See merge request !1116

Co-authored-by: default avatarFabian Seidl <fabian.seidl@h-da.de>
Co-authored-by: default avatarRenovate Bot <renovate@danet.fbi.h-da.de>
parent ea3c84e1
No related branches found
No related tags found
1 merge request!1116[renovate] Update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.35.2-20241127180247-a33202765966.1
Pipeline #239287 passed
......@@ -9,7 +9,7 @@ import (
func contains(array []*validate.Violation, err *validate.Violation) bool {
for _, v := range array {
if *v.FieldPath == *err.FieldPath && *v.ConstraintId == *err.ConstraintId && *v.Message == *err.Message {
if isEqualFieldPaths(v.Field, err.Field) && *v.ConstraintId == *err.ConstraintId && *v.Message == *err.Message {
return true
}
}
......@@ -17,6 +17,20 @@ func contains(array []*validate.Violation, err *validate.Violation) bool {
return false
}
func isEqualFieldPaths(violationFieldPath, errFieldPath *validate.FieldPath) bool {
if len(violationFieldPath.GetElements()) != len(errFieldPath.GetElements()) {
return false
}
for i, elem := range violationFieldPath.GetElements() {
if elem != errFieldPath.GetElements()[i] {
return false
}
}
return true
}
func assertValidationErrors(t *testing.T, err error, expectedValidationErrors []*validate.Violation) {
st := status.Convert(err)
errDetails := st.Details()
......
......@@ -86,7 +86,7 @@ require (
)
require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.2-20240920164238-5a7b106cbb87.1
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.2-20241127180247-a33202765966.1
github.com/bufbuild/protovalidate-go v0.7.3
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-plugin v1.4.10
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment