versions

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 4 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) (string, error)

MaxVersion takes a revision and a list of tags. If the revision is a version, it returns that version, even if it is not in the list of tags. If the revision is not a version, but is also not a constraint, it returns that revision, even if it is not in the list of tags. If the revision is a constraint, it iterates over the list of tags to find the "maximum" tag which satisfies that constraint. If the revision is a constraint, but no tag satisfies that constraint, then it returns an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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