semver

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParse = errors.New("could not parse provided string into semantic version")

Functions

This section is empty.

Types

type Comparsion

type Comparsion int
const (
	CompareEqual Comparsion = iota
	CompareOldMajor
	CompareNewMajor
	CompareOldMinor
	CompareNewMinor
	CompareOldPatch
	CompareNewPatch
)

type Version

type Version struct {
	Major int `json:"major,omitempty"`
	Minor int `json:"minor,omitempty"`
	Patch int `json:"patch,omitempty"`
}

func GetRendezvousVersion added in v1.1.2

func GetRendezvousVersion(ctx context.Context, addr string) (Version, error)

func Parse

func Parse(s string) (Version, error)

Parse parses the the provided string into a semver representation.

func (Version) Compare

func (sv Version) Compare(oracle Version) Comparsion

Compare compares the semver against the provided oracle statement.

func (Version) String

func (sv Version) String() string

String returns a string representation of the semver.

Jump to

Keyboard shortcuts

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