diff --git a/pkg/action/action.go b/pkg/action/action.go index 95a38905d..4c02031fa 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -99,9 +99,9 @@ const ( filenameAnnotation = "helm-postrender-filename" ) -// AnnotateAndMerge combines multiple YAML files into a single stream of documents, +// annotateAndMerge combines multiple YAML files into a single stream of documents, // adding filename annotations to each document for later reconstruction. -func AnnotateAndMerge(files map[string]string) (string, error) { +func annotateAndMerge(files map[string]string) (string, error) { var combinedManifests []*kyaml.RNode for fname, content := range files { // Skip partials and empty files. @@ -242,7 +242,7 @@ func (cfg *Configuration) renderResources(ch *chart.Chart, values chartutil.Valu // Merge files as stream of documents for sending to post renderer var merged string - if merged, err = AnnotateAndMerge(files); err != nil { + if merged, err = annotateAndMerge(files); err != nil { return hs, b, notes, fmt.Errorf("error merging manifests: %w", err) } diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index aaa5b4c16..c55b726ea 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -536,7 +536,7 @@ metadata: for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - merged, err := AnnotateAndMerge(tt.files) + merged, err := annotateAndMerge(tt.files) if tt.expectedError != "" { assert.Error(t, err) @@ -749,7 +749,7 @@ data: } // Merge and annotate - merged, err := AnnotateAndMerge(originalFiles) + merged, err := annotateAndMerge(originalFiles) require.NoError(t, err) // Split and deannotate