versions

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package versions provide helper functions for version constraint matching.

Index

Constants

View Source
const ErrCheck errors.Kind = "version check error"

ErrCheck indicates the version doesn't match the constraint for any reason.

Variables

This section is empty.

Functions

func Check

func Check(version string, constraint string, allowPrereleases bool) error

Check checks if version matches the provided constraint and fails otherwise. For just checking if they match, use the Match function.

func Match

func Match(version, constraint string, allowPrereleases bool) (bool, error)

Match checks if version matches the given constraint. It only returns an error in the case of invalid version or constraint string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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