INNER CODE UNIT · Go

Execute

xm1k3/cent · cmd/root.go:90

func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

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")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…