mergex

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeBom

func MergeBom(a, b *cyclonedx.BOM) *cyclonedx.BOM

MergeBom merges two cyclonedx.BOM structs non-destructively. For non-array fields, the first input (a) takes precedence. For array fields, items from both inputs are combined. Returns a new BOM struct without modifying the inputs.

func MergeBomAsDependency

func MergeBomAsDependency(a, b *cyclonedx.BOM) *cyclonedx.BOM

MergeBomAsDependency merges two BOMs by adding the second BOM's root component as a dependency of the first BOM. The second BOM's root component (metadata.component) is added to the components list and dependencies list of the first BOM. All other components and dependencies from the second BOM are also merged. If both BOMs have the same root component (same BOMRef OR same name+version+purl), performs a regular merge instead to avoid self-dependencies. Returns a new BOM struct without modifying the inputs.

func MergeBoms

func MergeBoms(boms []*cyclonedx.BOM) *cyclonedx.BOM

func MergeBomsAsDependency

func MergeBomsAsDependency(boms []*cyclonedx.BOM) *cyclonedx.BOM

func MergeComponent

func MergeComponent(a, b cyclonedx.Component) cyclonedx.Component

MergeComponent merges two cyclonedx.Component structs non-destructively. For non-array fields, the first input (a) takes precedence. For array fields, items from both inputs are combined. Returns a new Component struct without modifying the inputs.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL