gosemver

package
v0.0.0-...-d0882ac Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadVersionString = errors.New("invalid version string")

ErrBadVersionString meaning the version string is invalid

View Source
var ErrInvalidVersion = errors.New("invalid version")

ErrInvalidVersion is an error returned when the Version object is not valid.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major    uint64
	Minor    uint64
	Patch    int64
	Modifier string

} //struct

Version represents semantic versions of the go packaging. The Go archives don't strictly follow the standard. For example the first version of 1.15 for Linux is named g1.15.linux-amd64.tar.gz. To be compliant the package name would be go1.15.0.linux-amd64.tar.gz.

func MustParse

func MustParse(s string) *Version

MustParse calls Parse and will panic is there is an error parsing the Version from the string.

func Parse

func Parse(s string) (*Version, error)

Parse a Go style semver from a string.

func (Version) Less

func (v Version) Less(o *Version) bool

Less determines if this Version is less than the other Version.

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