semver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package semver parses and compares semantic version strings

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

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

Version holds parsed semver detail

func Parse

func Parse(version string) (Version, error)

Parse parses the given semver string

func (Version) Gte

func (s1 Version) Gte(s2 Version) bool

Gte checks if the given version is greater than or equal to another

func (Version) Lte

func (s1 Version) Lte(s2 Version) bool

Lte checks if the given version is less than or equal to another

Jump to

Keyboard shortcuts

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