Add a comment

This commit is contained in:
Michael Crenshaw
2023-10-24 09:22:30 -04:00
committed by GitHub
parent 234ab80086
commit 71546359b8

View File

@@ -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 {