forked from chanyipiaomiao/devops-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.go
41 lines (32 loc) · 804 Bytes
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package common
var (
// GoVersion Go版本
GoVersion = "go1.10.3"
// AppName 程序名称
AppName = "devops-api"
// AppVersion 程序版本号
AppVersion = "1.0.0"
// AppDescription 程序描述
AppDescription = "happy with devops-api"
// CommitHash git commit id
CommitHash = ""
// BuildDate 编译日期
BuildDate = "2018-08-29"
// Author 作者
Author = "helei"
// GitHub 地址
GitHub = "https://github.com/chanyipiaomiao"
)
// GetVersion 获取版本信息
func GetVersion() map[string]string {
return map[string]string{
"goVersion": GoVersion,
"appName": AppName,
"appVersion": AppVersion,
"commitHash": CommitHash,
"buildDate": BuildDate,
"author": Author,
"gitHub": GitHub,
"appDescription": AppDescription,
}
}