MCPcopy Index your code
hub / github.com/operator-framework/operator-sdk / appendResult

Function appendResult

internal/registry/validate.go:117–133  ·  view source on GitHub ↗

appendResult attempts to find a result in results that matches r.Name, and if found appends errors and warnings to that result. Otherwise r is added to the end of results.

(results []apierrors.ManifestResult, r apierrors.ManifestResult)

Source from the content-addressed store, hash-verified

115// if found appends errors and warnings to that result. Otherwise r is added
116// to the end of results.
117func appendResult(results []apierrors.ManifestResult, r apierrors.ManifestResult) []apierrors.ManifestResult {
118 resultIdx := -1
119 for i, result := range results {
120 if result.Name == r.Name {
121 resultIdx = i
122 break
123 }
124 }
125 if resultIdx < 0 {
126 results = append(results, r)
127 } else {
128 results[resultIdx].Add(r.Errors...)
129 results[resultIdx].Add(r.Warnings...)
130 }
131
132 return results
133}
134
135// RewriteAnnotationsYaml unmarshalls the specified yaml file, appends the content and
136// converts it again to yaml.

Callers 1

ValidateBundleContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected