version

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []Version

List is a slice of Versions that implements sort.Interface

func (List) Len

func (v List) Len() int

Len implements sort.Interface.Len()

func (List) Less

func (v List) Less(i, j int) bool

Less implements sort.Interface.Less()

func (List) Swap

func (v List) Swap(i, j int)

Swap implements sort.Interface.Swap()

type Version

type Version struct {
	Major      int
	Minor      int
	Patch      int
	PreRelease string
}

A Version is a version of the form <major>.<minor>.<patch>

func FromString

func FromString(v string) (ver Version, err error)

FromString returns a Version based on a string

func (Version) String

func (v Version) String() string

String formats Version as <major>.<minor>.<patch> or <major>.<minor>.<patch>-<prerelease>

Jump to

Keyboard shortcuts

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