semver

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package semver has been vendored from: https://github.com/coreos/go-semver/tree/e214231b295a8ea9479f11b70b35d5acf3556d9b/semver A number of the original functions of the package have been removed since they are not required for our built-ins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreRelease

type PreRelease string

PreRelease represents a pre-release suffix string

func (PreRelease) Slice

func (p PreRelease) Slice() []string

Slice splits the pre-release suffix string

type Version

type Version struct {
	Major      int64
	Minor      int64
	Patch      int64
	PreRelease PreRelease
	Metadata   string
}

Version represents a parsed SemVer

func NewVersion

func NewVersion(version string) (*Version, error)

NewVersion constructs new SemVers from strings

func (Version) Compare

func (v Version) Compare(versionB Version) int

Compare tests if v is less than, equal to, or greater than versionB, returning -1, 0, or +1 respectively.

func (*Version) Set

func (v *Version) Set(version string) error

Set parses and updates v from the given version string. Implements flag.Value

func (Version) Slice

func (v Version) Slice() []int64

Slice converts the comparable parts of the semver into a slice of integers.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

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