add build info to version flag
This commit is contained in:
parent
891b7febcf
commit
42be72f0b4
@ -22,6 +22,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
goDebug "runtime/debug"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -138,10 +139,13 @@ func GenerateAgentID() string {
|
||||
func ShowVersionInfo(ver string) {
|
||||
fmt.Println("Tactical RMM Agent:", ver)
|
||||
fmt.Println("Arch:", runtime.GOARCH)
|
||||
fmt.Println("Go version:", runtime.Version())
|
||||
if runtime.GOOS == "windows" {
|
||||
fmt.Println("Program Directory:", filepath.Join(os.Getenv("ProgramFiles"), progFilesName))
|
||||
}
|
||||
bi, ok := goDebug.ReadBuildInfo()
|
||||
if ok {
|
||||
fmt.Println(bi.String())
|
||||
}
|
||||
}
|
||||
|
||||
// TotalRAM returns total RAM in GB
|
||||
|
Loading…
Reference in New Issue
Block a user