nats migration

This commit is contained in:
2021-11-14 10:31:07 -03:00
parent 429580c010
commit 6aae4a5cdb
5 changed files with 75 additions and 17 deletions
+6 -2
View File
@@ -6,6 +6,8 @@ import (
"os"
)
var Ver string
func EnsureVer(v string) {
build := os.Getenv("BUILD_VER")
if build == "" {
@@ -21,6 +23,8 @@ func EnsureVer(v string) {
}
}
func Get() string {
build := os.Getenv("BUILD_VER")
return build
if Ver == "" {
Ver = os.Getenv("BUILD_VER")
}
return Ver
}