17 lines
285 B
Go
17 lines
285 B
Go
package version
|
|
|
|
var (
|
|
// The full version string
|
|
Version = "0.0.1"
|
|
|
|
// GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse --short=8 HEAD)"
|
|
GitCommit string
|
|
)
|
|
|
|
func GetVersion() string {
|
|
if GitCommit != "" {
|
|
return Version + "-" + GitCommit
|
|
}
|
|
return Version
|
|
}
|