version

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2016 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
}

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 Make

func Make(major int, minor int, patch int) Version

Make Builds a Version from major, minor, patch

func (Version) String

func (v Version) String() string

String formats Version as <major>.<minor>.<patch>

Jump to

Keyboard shortcuts

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