Show rumtime information in version output

This commit is contained in:
Ryan Cavicchioni 2021-03-02 00:44:38 -06:00
parent 4d3074fa14
commit de0bc2e133
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -2,6 +2,7 @@ package lumecmd
import ( import (
"fmt" "fmt"
"runtime"
) )
func NewCmdVersion() Command { func NewCmdVersion() Command {
@ -15,6 +16,8 @@ func NewCmdVersion() Command {
} }
func VersionCmd(args CmdArgs) (int, error) { func VersionCmd(args CmdArgs) (int, error) {
fmt.Println(Version) fmt.Printf("lume %s\n", Version)
fmt.Printf(" os/arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
fmt.Printf(" go version: %s\n", runtime.Version())
return ExitSuccess, nil return ExitSuccess, nil
} }