Skip to content

Commit

Permalink
Improve version subcommand
Browse files Browse the repository at this point in the history
adds Go version and platform information to the output

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
  • Loading branch information
palnabarun authored and johnSchnake committed Feb 11, 2022
1 parent 3fce527 commit 91f9c2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/sonobuoy/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package app

import (
"fmt"
"runtime"

"github.com/pkg/errors"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -57,6 +58,8 @@ func runVersion(versionflags *versionFlags) func(cmd *cobra.Command, args []stri
fmt.Printf("MinimumKubeVersion: %s\n", buildinfo.MinimumKubeVersion)
fmt.Printf("MaximumKubeVersion: %s\n", buildinfo.MaximumKubeVersion)
fmt.Printf("GitSHA: %s\n", buildinfo.GitSHA)
fmt.Printf("GoVersion: %s\n", runtime.Version())
fmt.Printf("Platform: %s/%s\n", runtime.GOOS, runtime.GOARCH)

// Get Kubernetes version, this is last so that the regular version information
// will be shown even if the API server cannot be contacted and throws an error
Expand Down

0 comments on commit 91f9c2a

Please sign in to comment.