Skip to content

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

License

Notifications You must be signed in to change notification settings

Jakosa/gosemver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gosemver Bitdeli Badge

LICENCE: GNU GPL v3

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/Jakosa/gosemver"
)

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%