target

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SbomTargets []string
	BinRoot     = "target/bin/"
)
View Source
var SBOMFn mg.Fn = mg.F(func(ctx context.Context) error {
	if len(SbomTargets) == 0 {
		targets, err := cyclonedx.FindTargets(BinRoot)
		if err != nil {
			return err
		}
		SbomTargets = targets
	}

	fns := make([]any, 0, len(SbomTargets))
	for _, target := range SbomTargets {
		fns = append(fns, mg.F(cyclonedx.AnalyzeBinToFile, target, target+".bom.json"))
	}

	mg.CtxDeps(ctx, fns...)
	return nil
})

Functions

This section is empty.

Types

type Go

type Go mg.Namespace

func (Go) SBOM

func (Go) SBOM(ctx context.Context) error

SBOM generates a sbom for all binaries under target/bin

Jump to

Keyboard shortcuts

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