I have two strings (they are actually version numbers and they could be any version numbers)
a := \"1.05.00.0156\" b := \"1.0.221.9289\"
go-semver is a semantic versioning library for Go. It lets you parse and compare two semantic version strings.
Example:
vA := semver.New("1.2.3") vB := semver.New("3.2.1") fmt.Printf("%s < %s == %t\n", vA, vB, vA.LessThan(*vB))
Output:
1.2.3 < 3.2.1 == true