vendor tsgo

This commit is contained in:
2026-07-09 16:50:43 -04:00
parent c06ea2e5a4
commit 98978e4930
5804 changed files with 1556156 additions and 101 deletions

View File

@@ -0,0 +1,33 @@
package core
import (
"strings"
)
// This is a var so it can be overridden by ldflags.
var version = "7.1.0-dev"
func Version() string {
return version
}
var versionMajorMinor = func() string {
seenMajor := false
i := strings.IndexFunc(version, func(r rune) bool {
if r == '.' {
if seenMajor {
return true
}
seenMajor = true
}
return false
})
if i == -1 {
panic("invalid version string: " + version)
}
return version[:i]
}()
func VersionMajorMinor() string {
return versionMajorMinor
}