| Conditions | 2 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package cmd |
||
| 25 | func NewVersionCommand(out io.Writer) *cobra.Command { |
||
| 26 | cmd := &cobra.Command{ |
||
| 27 | Use: "version", |
||
| 28 | Short: "Print the current version", |
||
| 29 | Run: func(cmd *cobra.Command, args []string) { |
||
| 30 | fmt.Fprintln( |
||
| 31 | out, |
||
| 32 | fmt.Sprintf("Version: %s", Version), |
||
| 33 | ) |
||
| 34 | fmt.Fprintln( |
||
| 35 | out, |
||
| 36 | fmt.Sprintf("Built at: %s", BuildTime), |
||
| 37 | ) |
||
| 38 | }, |
||
| 39 | } |
||
| 40 | |||
| 41 | return cmd |
||
| 42 | } |
||
| 43 |