(info VersionInfo)
| 24 | } |
| 25 | |
| 26 | func VersionCommand(info VersionInfo) *cobra.Command { |
| 27 | return &cobra.Command{ |
| 28 | Short: "Show the version information", |
| 29 | Use: "version", |
| 30 | Hidden: true, |
| 31 | Args: cobra.ExactArgs(0), |
| 32 | Run: func(cmd *cobra.Command, _ []string) { |
| 33 | cmd.Printf("Version: %s\nCommit: %s\n", info.Version, info.Commit) |
| 34 | }, |
| 35 | } |
| 36 | } |