semver

package
v0.0.0-...-f68c5c2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package semver provides a way to parse and compare semantic versions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SemVer

type SemVer struct {
	Major int
	Minor int
	Patch int
}

SemVer describes a semantic version number.

func New

func New(verison string) (SemVer, error)

New takes a semantic version number as a string and returns a SemVer object.

func (SemVer) GreaterThan

func (s SemVer) GreaterThan(sem SemVer) bool

GreaterThan takes a SemVer object and reports true if it is greater than the SemVer object.

func (SemVer) GreaterThanEqual

func (s SemVer) GreaterThanEqual(sem SemVer) bool

GreaterThanEqual takes a SemVer object and reports true if it is greater than or equal to the SemVer object.

func (SemVer) LessThan

func (s SemVer) LessThan(sem SemVer) bool

LessThan takes a SemVer object and reports true if it is less than the SemVer object.

Jump to

Keyboard shortcuts

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