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