Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidVersion is returned when a version string doesn't meet the // requirements of a Wolfi-compatible version. ErrInvalidVersion = errors.New("not a valid Wolfi package version") // ErrInvalidFullVersion is returned when a version string doesn't meet the // requirements of a Wolfi-compatible "full" version (which should include the // epoch suffix). ErrInvalidFullVersion = errors.New("not a valid full Wolfi package version (with epoch)") )
Functions ¶
func NewVersion ¶
NewVersion some older versions in wolfi contain an underscore to separate pre-release
func ValidateWithEpoch ¶ added in v0.5.1
ValidateWithEpoch checks if the given package version, which is expected to include the epoch component, is a Wolfi-compatible "full" version. It returns an error if not.
func ValidateWithoutEpoch ¶ added in v0.5.1
ValidateWithoutEpoch checks if the given package version, which is expected NOT to include the epoch component, is a Wolfi-compatible version. It returns an error if not.
Types ¶
type ByLatestStrings ¶
type ByLatestStrings []string
ByLatestStrings is like ByLatest but lets the user pass in strings instead of Version objects.
func (ByLatestStrings) Len ¶
func (by ByLatestStrings) Len() int
func (ByLatestStrings) Less ¶
func (by ByLatestStrings) Less(i, j int) bool
func (ByLatestStrings) Swap ¶
func (by ByLatestStrings) Swap(i, j int)
type Interface ¶
type Interface interface { // Len is the number of elements in the collection. Len() int // Less reports whether the element with index i must sort before the element with index j. // If both Less(i, j) and Less(j, i) are false, then the elements at index i and j are considered equal. Less(i, j int) bool // Swap swaps the elements with indexes i and j. Swap(i, j int) }
Click to show internal directories.
Click to hide internal directories.