()
| 32 | } |
| 33 | |
| 34 | func init() { |
| 35 | cobra.OnInitialize(initConfig) |
| 36 | |
| 37 | // Here you will define your flags and configuration settings. |
| 38 | // Cobra supports persistent flags, which, if defined here, |
| 39 | // will be global for your application. |
| 40 | |
| 41 | RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.capipe.yaml)") |
| 42 | |
| 43 | // Cobra also supports local flags, which will only run |
| 44 | // when this action is called directly. |
| 45 | RootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") |
| 46 | } |
| 47 | |
| 48 | // initConfig reads in config file and ENV variables if set. |
| 49 | func initConfig() { |
nothing calls this directly
no outgoing calls
no test coverage detected