mirror of https://github.com/k3s-io/k3s
Show go version when executes with --version.
Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>pull/2551/head
parent
87a43c69e1
commit
3f0f2b342e
|
@ -3,6 +3,7 @@ package cmds
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/rancher/k3s/pkg/version"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
@ -33,6 +34,7 @@ func NewApp() *cli.App {
|
|||
app.Version = fmt.Sprintf("%s (%s)", version.Version, version.GitCommit)
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
fmt.Printf("%s version %s\n", app.Name, app.Version)
|
||||
fmt.Printf("go version %s\n", runtime.Version())
|
||||
}
|
||||
app.Flags = []cli.Flag{
|
||||
DebugFlag,
|
||||
|
|
Loading…
Reference in New Issue