Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
(smartVersion SmartVersion)
| 135 | // Execute adds all child commands to the root command and sets flags appropriately. |
| 136 | // This is called by main.main(). It only needs to happen once to the rootCmd. |
| 137 | func Execute(smartVersion SmartVersion) { |
| 138 | |
| 139 | Version = smartVersion |
| 140 | common.SmartIDELog.Error(rootCmd.Execute()) |
| 141 | |
| 142 | } |
| 143 | |
| 144 | func init() { |
| 145 | cobra.OnInitialize(initConfig) |