cleanup code (#4019)

This commit is contained in:
fatedier
2024-02-22 21:04:21 +08:00
committed by GitHub
parent 80cfd0938e
commit 7ae3719b82
9 changed files with 0 additions and 197 deletions

View File

@@ -14,34 +14,8 @@
package version
import (
"strconv"
"strings"
)
var version = "0.54.0"
func Full() string {
return version
}
func getSubVersion(v string, position int) int64 {
arr := strings.Split(v, ".")
if len(arr) < 3 {
return 0
}
res, _ := strconv.ParseInt(arr[position], 10, 64)
return res
}
func Proto(v string) int64 {
return getSubVersion(v, 0)
}
func Major(v string) int64 {
return getSubVersion(v, 1)
}
func Minor(v string) int64 {
return getSubVersion(v, 2)
}