d2/lib/version/version.go
Alexander Wang 1cfa97b759
bump tests
2023-06-09 20:50:58 -07:00

14 lines
280 B
Go

package version
import "regexp"
// Pre-built binaries will have version set correctly during build time.
var Version = "v0.5.1-HEAD"
func OnlyNumbers() string {
re, err := regexp.Compile("[0-9]+.[0-9]+.[0-9]+")
if err != nil {
return ""
}
return re.FindString(Version)
}