Fresh repository history for elektrine/magpie hosted at https://git.elektrine.com/elektrine/magpie.
29 lines
507 B
Go
29 lines
507 B
Go
package main
|
|
|
|
import "runtime"
|
|
|
|
var (
|
|
version = "dev"
|
|
commit = "unknown"
|
|
date = "unknown"
|
|
)
|
|
|
|
type VersionInfo struct {
|
|
Version string `json:"version"`
|
|
Commit string `json:"commit"`
|
|
Date string `json:"date"`
|
|
Go string `json:"go"`
|
|
OS string `json:"os"`
|
|
Arch string `json:"arch"`
|
|
}
|
|
|
|
func versionInfo() VersionInfo {
|
|
return VersionInfo{
|
|
Version: version,
|
|
Commit: commit,
|
|
Date: date,
|
|
Go: runtime.Version(),
|
|
OS: runtime.GOOS,
|
|
Arch: runtime.GOARCH,
|
|
}
|
|
}
|