Skip to content

Commit

Permalink
fix: add version flag to cobra cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mircea-pavel-anton committed Aug 11, 2024
1 parent 7d57fa5 commit 197ffd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import (
)

var configDir string // Global flag for the kubeconfig directory
var version string // The version of the tool, set at build time

var rootCmd = &cobra.Command{
Use: "kube-switcher",
Short: "A tool to switch Kubernetes contexts",
Long: `kube-switcher is a CLI tool to switch Kubernetes contexts from multiple kubeconfig files.`,
Use: "kube-switcher",
Short: "A tool to switch Kubernetes contexts",
Long: `kube-switcher is a CLI tool to switch Kubernetes contexts from multiple kubeconfig files.`,
Version: version,
}

func Execute() {
Expand Down

0 comments on commit 197ffd8

Please sign in to comment.