INNER CODE UNIT · Go
init
xm1k3/cent · cmd/root.go:97
func init() {
cobra.OnInitialize(initConfig)
rootCmd.CompletionOptions.DisableDefaultCmd = true
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is .config/cent/.cent.yaml)")
rootCmd.Flags().StringP("path", "p", "cent-nuclei-templates", "Root path to save the templates")
rootCmd.Flags().BoolP("console", "C", false, "Print console output")
rootCmd.Flags().IntP("threads", "t", 10, "Number of threads to use when cloning repositories")
rootCmd.Flags().IntP("timeout", "T", 2, "timeout in minutes for each git clone")
rootCmd.Flags().BoolP("keep-folders", "k", false, "Keep templates organized in folders by category")
rootCmd.Flags().BoolP("by-repo", "r", false, "Group templates by repository (use with -k)")
rootCmd.MarkFlagRequired("name")
}
// initConfig reads in config file and ENV variables if set.
func initConfig() {