From 71546359b8ab666c8840df2898327db09332acac Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:22:30 -0400 Subject: [PATCH] Add a comment --- kyaml/fn/framework/processors.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kyaml/fn/framework/processors.go b/kyaml/fn/framework/processors.go index 3cbf36b77..1b390b269 100644 --- a/kyaml/fn/framework/processors.go +++ b/kyaml/fn/framework/processors.go @@ -176,6 +176,9 @@ func LoadFunctionConfig(src *yaml.RNode, api interface{}) error { return schemaValidationError } +// combineErrors produces a CompositeValidationError for the given schemaErr and givenErr. +// If either is already a CompsiteError, its constituent errors become part of the new +// composite error. If both given errors are nil, this function returns nil. func combineErrors(schemaErr, customErr error) error { combined := validationErrors.CompositeValidationError() if compositeSchemaErr, ok := schemaErr.(*validationErrors.CompositeError); ok {