Skip to content

Version comparing library in go (using semantic versioning standard http://semver.org)

Notifications You must be signed in to change notification settings

thenonameguy/gosemver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

gosemver

LICENCE: GNU GPL 3

Version comparing library in go (using semantic versioning standard http://semver.org)

Compare 2 version formats for which is greater.
For valid version examples and more information see http://semver.org
Returns: 0 if equals, 1 if the first version arg is greater, 2 if the second, -1 if problem occured.

Usage

package main

import (
	"fmt"
	"github.com/Jackneill/gosemver"
)

func main() {
	fmt.Println(gosemver.Compare("v0.3.6", "0.4"))
}

About

Version comparing library in go (using semantic versioning standard http://semver.org)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages