Documentation ¶
Overview ¶
Package mod provides the functionality to generate SBOMs for modules.
Please refer to the CLI documentation for further details about this mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(g *generator) error
Option allows for customization of the generator using the functional options pattern.
func WithComponentType ¶
func WithComponentType(ctype cdx.ComponentType) Option
WithComponentType overrides the type of the main component. Default is ComponentTypeApplication.
func WithIncludeStdlib ¶
WithIncludeStdlib toggles the inclusion of a std component representing the Go standard library in the generated BOM.
When enabled, the std component will be represented as a direct dependency of the main module.
func WithIncludeTestModules ¶
WithIncludeTestModules toggles the inclusion of test-only modules.
func WithLicenseDetector ¶
func WithLicenseDetector(detector licensedetect.Detector) Option
WithLicenseDetector sets the license detector.
When nil, no license detection will be performed. Default is nil.
func WithLogger ¶
WithLogger overrides the default logger of the generator.