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.
package main
import (
"fmt"
"github.com/Jakosa/gosemver"
)
func main() {
fmt.Println(gosemver.Compare("v0.3.6", "0.4")) // prints 2
}