d2/lib/version/version.go
Alexander Wang cd6c6b6fda
bump tests
2023-05-01 13:53:19 -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.4.2-HEAD"
func OnlyNumbers() string {
re, err := regexp.Compile("[0-9]+.[0-9]+.[0-9]+")
if err != nil {
return ""
}
return re.FindString(Version)
}