git.sr.ht/~pingoo/stdx@v0.0.0-20240218134121-094174641f6e/semver/semver.go (about)

     1  package semver
     2  
     3  import "golang.org/x/mod/semver"
     4  
     5  func IsValid(version string) bool {
     6  	return semver.IsValid("v" + version)
     7  }
     8  
     9  func Compare(v, w string) int {
    10  	return semver.Compare("v"+v, "v"+w)
    11  }