()
| 20 | } |
| 21 | |
| 22 | func versionCmd() *cobra.Command { |
| 23 | flags := versionFlags{} |
| 24 | command := &cobra.Command{ |
| 25 | Use: "version", |
| 26 | Short: "Print version information", |
| 27 | Args: cobra.NoArgs, |
| 28 | RunE: func(cmd *cobra.Command, args []string) error { |
| 29 | return versionCmdFunc(cmd, args, flags) |
| 30 | }, |
| 31 | } |
| 32 | |
| 33 | command.Flags().BoolVarP(&flags.verbose, "verbose", "v", false, // value |
| 34 | "displays additional version information", |
| 35 | ) |
| 36 | |
| 37 | command.AddCommand(selfUpdateCmd()) |
| 38 | return command |
| 39 | } |
| 40 | |
| 41 | func selfUpdateCmd() *cobra.Command { |
| 42 | command := &cobra.Command{ |
no test coverage detected