semver

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// NoneVersion is the empty semver
	NoneVersion = Version{}
)

Functions

This section is empty.

Types

type Version

type Version struct {
	Name  string `json:"name"`
	Major uint64 `json:"major"`
	Minor uint64 `json:"minor"`
	Patch uint64 `json:"patch"`
}

Version describe a semantic version

func Parse

func Parse(version string) (Version, error)

Parse given version string into a version

func (Version) Compare

func (s Version) Compare(other Version) string

Compare return version diff in semver nomenclture

func (Version) IsGreater

func (s Version) IsGreater(other Version) bool

IsGreater check if current version is greater than other

Jump to

Keyboard shortcuts

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