github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/updater/util/semver.go (about) 1 package util 2 3 import "github.com/blang/semver" 4 5 // Semver outputs the semver in Major.Minor.Patch form for readability. 6 func Semver(version string) string { 7 v, err := semver.Parse(version) 8 if err != nil { 9 return version 10 } 11 v.Pre = nil 12 v.Build = nil 13 return v.String() 14 }