feat: added modules

This commit is contained in:
Marvin Zhang
2024-06-14 15:42:50 +08:00
parent 4d0adcb6f0
commit c4d795f47f
626 changed files with 60104 additions and 0 deletions

33
core/cmd/root.go Normal file
View File

@@ -0,0 +1,33 @@
package cmd
import (
"github.com/spf13/cobra"
)
var (
// Used for flags.
cfgFile string
rootCmd = &cobra.Command{
Use: "crawlab",
Short: "CLI tool for Crawlab",
Long: `The CLI tool is for controlling against Crawlab.
Crawlab is a distributed web crawler and task admin platform
aimed at making web crawling and task management easier.
`,
}
)
// Execute executes the root command.
func Execute() error {
return rootCmd.Execute()
}
// GetRootCmd get rootCmd instance
func GetRootCmd() *cobra.Command {
return rootCmd
}
func init() {
rootCmd.PersistentFlags().StringVar(&cfgFile, "c", "", "Use Custom Config File")
}