增加SQL子版本

This commit is contained in:
GoEdgeLab
2022-03-14 16:06:25 +08:00
parent d68e807915
commit f798ca31e9
5 changed files with 39 additions and 5 deletions

20
internal/setup/utils.go Normal file
View File

@@ -0,0 +1,20 @@
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
package setup
import (
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"strings"
)
func ComposeSQLVersion() string {
var version = teaconst.Version
if len(teaconst.SQLVersion) == 0 {
return version
}
if strings.Count(version, ".") <= 2 {
return version + "." + teaconst.SQLVersion
}
return version
}