mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
23 lines
443 B
Go
23 lines
443 B
Go
package util
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/replicatedhq/troubleshoot/pkg/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func VersionCmd() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print the current version and exit",
|
|
Long: `Print the current version and exit`,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
fmt.Printf("Replicated Troubleshoot %s\n", version.Version())
|
|
|
|
return nil
|
|
},
|
|
}
|
|
return cmd
|
|
}
|