Files
HomeDash-Backend/utility/bin_utils/bin_info.go
2023-10-03 15:57:52 +08:00

20 lines
508 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package binInfo
// 初始化为 unknown如果编译时没有传入这些值则为 unknown
var (
GitTag = "unknown"
GitCommitLog = "unknown"
GitStatus = "cleanly"
BuildTime = "unknown"
BuildGoVersion = "unknown"
)
// VersionString 返回版本信息
func VersionString() string {
return "GitTag:" + GitTag + "\n" +
"GitCommitLog:" + GitCommitLog + "\n" +
"GitStatus:" + GitStatus + "\n" +
"BuildTime:" + BuildTime + "\n" +
"BuildGoVersion:" + BuildGoVersion + "\n"
}