pgweb/pkg/command/version.go

35 lines
678 B
Go
Raw Normal View History

package command
const (
2019-11-29 13:59:50 -06:00
// Version is the current Pgweb application version
2022-07-05 21:11:03 -05:00
Version = "0.11.12"
)
var (
2019-11-29 13:59:50 -06:00
// GitCommit contains the Git commit SHA for the binary
GitCommit string
2019-11-29 13:59:50 -06:00
// BuildTime contains the binary build time
BuildTime string
2019-11-29 13:59:50 -06:00
// GoVersion contains the build time Go version
2019-11-29 13:59:50 -06:00
GoVersion string
// Info contains all version information
Info VersionInfo
)
type VersionInfo struct {
Version string `json:"version"`
GitCommit string `json:"git_sha"`
BuildTime string `json:"build_time"`
GoVersion string `json:"go_version"`
}
func init() {
Info.Version = Version
Info.GitCommit = GitCommit
Info.BuildTime = BuildTime
Info.GoVersion = GoVersion
}