MCPcopy Index your code
hub / github.com/crossplane-contrib/function-patch-and-transform / WrapFieldErrorList

Function WrapFieldErrorList

validate.go:24–32  ·  view source on GitHub ↗

WrapFieldErrorList wraps the given field.ErrorList adding the given field.Path as root of the Field.

(errs field.ErrorList, path *field.Path)

Source from the content-addressed store, hash-verified

22
23// WrapFieldErrorList wraps the given field.ErrorList adding the given field.Path as root of the Field.
24func WrapFieldErrorList(errs field.ErrorList, path *field.Path) field.ErrorList {
25 if path == nil {
26 return errs
27 }
28 for i := range errs {
29 errs[i] = WrapFieldError(errs[i], path)
30 }
31 return errs
32}
33
34// ValidateResources validates the Resources object.
35func ValidateResources(r *v1beta1.Resources) *field.Error {

Callers

nothing calls this directly

Calls 1

WrapFieldErrorFunction · 0.85

Tested by

no test coverage detected