version

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BestMatch

func BestMatch(versions []string, constraint string) (string, error)

BestMatch returns the highest version from versions that satisfies the constraint. Returns empty string if no version matches.

func FilterSemver

func FilterSemver(versions []*semver.Version, constraint string) ([]*semver.Version, error)

FilterSemver filters parsed semver.Version values by a constraint string. Results are returned sorted descending (newest first).

func FilterVersions

func FilterVersions(versions []string, constraint string) ([]string, error)

FilterVersions filters a list of version strings by a semver constraint string. Non-semver strings (e.g., "latest", "stable") are silently excluded. Results are returned sorted descending (newest first).

func ListCatalogVersions

func ListCatalogVersions(ctx context.Context, catalogs []catalog.Catalog, kind catalog.ArtifactKind, name string) ([]string, error)

ListCatalogVersions returns all semver version strings for the given artifact by querying catalogs in order. The first catalog to return results wins. If all catalogs fail, the last error is included in the returned error.

func ValidateConstraint

func ValidateConstraint(constraint string) error

ValidateConstraint checks whether a constraint string is valid semver syntax.

Types

This section is empty.

Jump to

Keyboard shortcuts

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