func VersionCmp(a, b string) int {
	aNums := strings.Split(a, ".")
	bNums := strings.Split(b, ".")
	for i := 0; i < min(len(aNums), len(bNums)); i++ {
		aInt, _ := strconv.Atoi(aNums[i])
		bInt, _ := strconv.Atoi(bNums[i])
		if aInt < bInt {
			return -1
		} else if aInt > bInt {
			return 1
		}
	}
	if len(aNums) < len(bNums) {
		return -1
	} else if len(aNums) > len(bNums) {
		return 1
	}
	return 0
}
VersionCmp returns an int indicating the difference between a and b. It
follows the convention of bytes.Compare and big.Cmp:

-1 if a <  b
0 if a == b
+1 if a >  b

One important quirk is that "1.1.0" is considered newer than "1.1", despite
being numerically equal.
package build
import (
	"strconv"
	"strings"
)
const (
	MaxEncodedVersionLength = 100
	Version = "1.3.3"
)
func IsVersion(str string) bool {
	for _, n := range strings.Split(str, ".") {
		if _, err := strconv.Atoi(n); err != nil {
			return false
		}
	}
	return true
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}