Browse Source

Show go version when executes with --version.

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
pull/2551/head
Chin-Ya Huang 4 years ago committed by Brad Davidson
parent
commit
3f0f2b342e
  1. 2
      pkg/cli/cmds/root.go

2
pkg/cli/cmds/root.go

@ -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…
Cancel
Save