semver

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2014 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

COPIED FROM http://code.google.com/p/go-semver/

The version package implements semantic versions as described at http://semver.org/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major      int      // The major version number.
	Minor      int      // The minor version number.
	Patch      int      // The patch version number.
	Prerelease []string // The pre-release version (dot-separated elements)
	Build      []string // The build version (dot-separated elements)
}

Version represents a parsed version. See http://semver.org/ for detailed description of the various components.

func Parse

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

Parse parses the version, which is of one of the following forms:

1.2.3
1.2.3-prerelease
1.2.3+build
1.2.3-prerelease+build

func (*Version) Less

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

Less returns whether v is semantically earlier in the version sequence than w.

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