Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Jones <danj@replicated.com>
  • Loading branch information
danj-replicated committed Sep 5, 2022
1 parent 63510fc commit b6f8ac2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/supportbundle/supportbundle.go
Expand Up @@ -227,16 +227,12 @@ func AnalyzeSupportBundle(spec *troubleshootv1beta2.SupportBundleSpec, tmpDir st
return analyzeResults, nil
}


// the intention with these appends is to swap them out at a later date with more specific handlers for merging the spec fields
func ConcatSpec(target *troubleshootv1beta2.SupportBundle, source *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.SupportBundle{

func ConcatSpec(target *troubleshootv1beta2.SupportBundle, source *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.SupportBundle {
newBundle := target.DeepCopy()

for _, v := range source.Spec.Collectors {
newBundle.Spec.Collectors = append(target.Spec.Collectors,v)
newBundle.Spec.Collectors = append(target.Spec.Collectors, v)
}

for _, v := range source.Spec.AfterCollection {
newBundle.Spec.AfterCollection = append(target.Spec.AfterCollection, v)
}
Expand Down

0 comments on commit b6f8ac2

Please sign in to comment.