Conditions | 2 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package cmd |
||
23 | func New() CliBase { |
||
24 | var release = "latest" |
||
25 | if value, ok := syscall.Getenv("VERSION"); ok { |
||
26 | release = value |
||
27 | } |
||
28 | |||
29 | cmd := &cobra.Command{ |
||
30 | Use: commandBase, |
||
31 | Version: release, |
||
32 | Long: bannerPrint, |
||
33 | CompletionOptions: cobra.CompletionOptions{ |
||
34 | DisableDefaultCmd: false, |
||
35 | DisableNoDescFlag: false, |
||
36 | DisableDescriptions: false, |
||
37 | HiddenDefaultCmd: true, |
||
38 | }, |
||
39 | } |
||
40 | |||
41 | return &cliBase{rootCmd: cmd} |
||
42 | } |
||
58 |