versioncheck

package
v0.0.0-...-ec72bf4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package versioncheck provides utility wrappers for go-version, allowing the constraints to be used as global variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(constraint string) (semver.Range, error)

Compile trivially wraps go-version.NewConstraint, returning the constraint and error

func MustCompile

func MustCompile(constraint string) semver.Range

MustCompile wraps go-version.NewConstraint, panicing when an error is returns (this occurs when the constraint cannot be parsed). It is intended to be use similar to re.MustCompile, to ensure unparseable constraints are caught in testing.

func MustVersion

func MustVersion(version string) semver.Version

MustVersion wraps go-version.NewVersion, panicing when an error is returns (this occurs when the version cannot be parsed).

func Version

func Version(version string) (semver.Version, error)

Version wraps go-version.NewVersion, panicing when an error is returns (this occurs when the version cannot be parsed).

Types

This section is empty.

Jump to

Keyboard shortcuts

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