MCPcopy Create free account
hub / github.com/AdminTurnedDevOps/CapabilityPE / init

Function init

cmd/root.go:34–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func 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.
49func initConfig() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected