1 Star 0 Fork 0

jeffops / API-DEMO

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
version.go 501 Bytes
一键复制 编辑 原始数据 按行查看 历史
jeffops 提交于 2023-06-19 22:45 . 添加version信息
package version
import (
"fmt"
)
const (
ServiceName = "demo-api"
)
var (
GIT_TAG string
GIT_COMMIT string
GIT_BRANCH string
BUILD_TIME string
GO_VERSION string
)
func FullVersion() string {
version := fmt.Sprintf("Version : %s\nBuild Time: %s\nGit Branch: %s\nGit Commit: %s\nGo Version: %s\n", GIT_TAG, BUILD_TIME, GIT_BRANCH, GIT_COMMIT, GO_VERSION)
return version
}
// Short 版本缩写
func Short() string {
return fmt.Sprintf("%s[%s %s]", GIT_TAG, BUILD_TIME, GIT_COMMIT)
}
Go
1
https://gitee.com/wx_68f311c3da/api-demo.git
git@gitee.com:wx_68f311c3da/api-demo.git
wx_68f311c3da
api-demo
API-DEMO
553a5871bd68

搜索帮助