version

package
v0.11.0-dev.5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version :: The version package provides a location to set the release versions for all packages to consume, without creating import cycles.

This package should not import any other steampipe packages.

Index

Constants

This section is empty.

Variables

View Source
var SteampipeVersion *semver.Version

SteampipeVersion is an instance of semver.Version. This has the secondary benefit of verifying during tests and init time that our version is a proper semantic version, which should always be the case.

Functions

This section is empty.

Types

type Constraints

type Constraints struct {
	Original string
	// contains filtered or unexported fields
}

Constraints wraps semver.Constraints type, adding the Original property

func NewConstraint

func NewConstraint(c string) (*Constraints, error)

func (Constraints) Check

func (c Constraints) Check(v *semver.Version) bool

Check tests if a version satisfies the constraints.

func (Constraints) Equals

func (c Constraints) Equals(other *Constraints) bool

func (Constraints) IsPrerelease

func (c Constraints) IsPrerelease() bool

IsPrerelease determines whether the constraint parses as a specifc version with prerelease or metadata set

func (Constraints) Validate

func (c Constraints) Validate(v *semver.Version) (bool, []error)

Validate checks if a version satisfies a constraint. If not a slice of reasons for the failure are returned in addition to a bool.

Jump to

Keyboard shortcuts

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