package semver
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/coreos/go-semver/semver"
Index ¶
- func Sort(versions []*Version)
- type PreRelease
- type Version
- func NewVersion(version string) (*Version, error)
- func (v *Version) BumpMajor()
- func (v *Version) BumpMinor()
- func (v *Version) BumpPatch()
- func (v *Version) LessThan(versionB Version) bool
- func (v *Version) Slice() []int64
- func (v *Version) String() string
- type Versions
Functions ¶
func Sort ¶
func Sort(versions []*Version)
Sort sorts the given slice of Version
Types ¶
type PreRelease ¶
type PreRelease string
func (*PreRelease) Slice ¶
func (p *PreRelease) Slice() []string
type Version ¶
type Version struct { Major int64 Minor int64 Patch int64 PreRelease PreRelease Metadata string }
func NewVersion ¶
func (*Version) BumpMajor ¶
func (v *Version) BumpMajor()
BumpMajor increments the Major field by 1 and resets all other fields to their default values
func (*Version) BumpMinor ¶
func (v *Version) BumpMinor()
BumpMinor increments the Minor field by 1 and resets all other fields to their default values
func (*Version) BumpPatch ¶
func (v *Version) BumpPatch()
BumpPatch increments the Patch field by 1 and resets all other fields to their default values
func (*Version) LessThan ¶
func (*Version) Slice ¶
Slice converts the comparable parts of the semver into a slice of strings
func (*Version) String ¶
type Versions ¶
type Versions []*Version
func (Versions) Len ¶
func (Versions) Less ¶
func (Versions) Swap ¶
Source Files ¶
semver.go sort.go
- Version
- v1.1.4-beta.0
- Published
- Dec 7, 2015
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 10 minutes ago –
Tools for package owners.