init: ops-assistant codebase
This commit is contained in:
22
version/version.go
Normal file
22
version/version.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package version
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
Version = "dev"
|
||||
GitCommit = "unknown"
|
||||
BuildTime = "unknown"
|
||||
GoVersion = runtime.Version()
|
||||
)
|
||||
|
||||
func Info() string {
|
||||
return fmt.Sprintf("Ops-Assistant %s (commit: %s, built: %s, %s %s/%s)",
|
||||
Version, GitCommit, BuildTime, GoVersion, runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
||||
func Short() string {
|
||||
return fmt.Sprintf("Ops-Assistant %s", Version)
|
||||
}
|
||||
Reference in New Issue
Block a user