release

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID string = "v1.24.0"
)

Variables

View Source
var BuildCommit string

BuildCommit is populated at link time via `-ldflags "-X github.com/chainguard-dev/malcontent/pkg/release.BuildCommit=<sha>"`. When unset, ResolveRuleURLCommit returns "" (callers fall back to "main").

Functions

func PinRuleURLRef added in v1.24.0

func PinRuleURLRef(ref string)

PinRuleURLRef forces ResolveRuleURLCommit to return ref instead of deriving the value from BuildCommit. The pin is concurrency-safe: callers set it before scan goroutines start, but the atomic guarantees correctness under -race.

func ResetRuleURLRef added in v1.24.0

func ResetRuleURLRef()

ResetRuleURLRef clears any override set by PinRuleURLRef, restoring the default BuildCommit-based behavior. Exported for test cleanup.

func ResolveRuleURLCommit added in v1.24.0

func ResolveRuleURLCommit() string

ResolveRuleURLCommit returns the commit ref used in generated rule deep-link URLs. When an explicit pin has been set via PinRuleURLRef that value wins unconditionally. Otherwise a canonical 40-char lowercase hex BuildCommit, injected at link time by production builds, yields that pinned commit. Any other BuildCommit value yields ""; callers should fall back to "main" to produce a working URL rather than suppressing it.

func Version

func Version() (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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