versions

package
v3.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConstraint added in v3.1.0

func IsConstraint(revision string) bool

Returns true if the given revision is not an exact semver and can be parsed as a semver constraint

func IsVersion

func IsVersion(text string) bool

func MaxVersion

func MaxVersion(revision string, tags []string, tagPrefix string) (string, error)

MaxVersion returns the highest version tag satisfying revision, optionally scoped to a tag prefix. If tagPrefix is non-empty, only tags with that prefix are considered; the prefix is stripped before semver comparison and re-added to the returned value. Exact versions and non-constraint strings are returned as-is (with prefix prepended) without consulting the tag list. Returns an error if revision is a constraint and no matching tag is found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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