From 234ab80086d03894fdf3e560e957ed387500666c Mon Sep 17 00:00:00 2001 From: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:00:29 -0400 Subject: [PATCH 1/2] chore(docs): fix grammar error in comment --- kyaml/fn/framework/processors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyaml/fn/framework/processors.go b/kyaml/fn/framework/processors.go index 7d2a9b4c9c..3cbf36b77a 100644 --- a/kyaml/fn/framework/processors.go +++ b/kyaml/fn/framework/processors.go @@ -227,7 +227,7 @@ type TemplateProcessor struct { PatchTemplates []PatchTemplate // MergeResources, if set to true, will cause the resources in ResourceList.items to be - // will be applied as patches on any matching resources generated by ResourceTemplates. + // applied as patches on any matching resources generated by ResourceTemplates. MergeResources bool // PreProcessFilters provides a hook to manipulate the ResourceList's items or config after 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 2/2] 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 3cbf36b77a..1b390b2695 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 {