lume/cmd/version.go

24 lines
417 B
Go
Raw Normal View History

2021-02-14 00:42:47 +00:00
package lumecmd
2021-02-28 04:42:09 +00:00
import (
"fmt"
"runtime"
2021-02-28 04:42:09 +00:00
)
func NewCmdVersion() Command {
return Command{
Name: "version",
Func: VersionCmd,
Flags: nil,
Use: "",
Short: "Show version",
}
}
func VersionCmd(args CmdArgs) (int, error) {
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())
2021-02-28 04:42:09 +00:00
return ExitSuccess, nil
}