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.
()
| 143 | // Execute adds all child commands to the root command and sets flags appropriately. |
| 144 | // This is called by main.main(). It only needs to happen once to the rootCmd. |
| 145 | func Execute() { |
| 146 | if err := rootCmd.Execute(); err != nil { |
| 147 | fmt.Println(err) |
| 148 | os.Exit(1) |
| 149 | } |
| 150 | targetdir.TargetHomeCreate() |
| 151 | } |
| 152 | |
| 153 | func init() { |
| 154 | cobra.OnInitialize(initConfig) |
no test coverage detected