Add Version Output Support to Snowflake

From now on, there will be a file at common/version/version.go that includes current version number.
This commit is contained in:
Shelikhoo 2022-11-08 14:58:23 +00:00
parent 2c599f8827
commit 33248f3dec
No known key found for this signature in database
GPG key ID: C4D5E79D22B25316
8 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,5 @@
package version
func ConstructResult() string {
return GetVersion() + "\n" + GetVersionDetail()
}

13
common/version/detail.go Normal file
View file

@ -0,0 +1,13 @@
package version
import "strings"
var detailBuilder strings.Builder
func AddVersionDetail(detail string) {
detailBuilder.WriteString(detail)
}
func GetVersionDetail() string {
return detailBuilder.String()
}

View file

@ -0,0 +1,7 @@
package version
func GetVersion() string {
return version
}
var version = "2.3.1"