dae/cmd/cmd.go

29 lines
596 B
Go
Raw Normal View History

2023-01-27 01:10:27 +07:00
package cmd
import (
"github.com/spf13/cobra"
)
var (
Version = "unknown"
rootCmd = &cobra.Command{
Use: "dae [flags] [command [argument ...]]",
Short: "dae is a lightweight and high-performance transparent proxy solution.",
Long: `dae is a lightweight and high-performance transparent proxy solution.`,
Version: Version,
2023-01-28 01:01:33 +07:00
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
2023-01-27 01:10:27 +07:00
}
)
// Execute executes the root command.
func Execute() error {
return rootCmd.Execute()
}
func init() {
2023-01-28 00:50:21 +07:00
rootCmd.AddCommand(runCmd)
2023-02-04 21:21:27 +07:00
rootCmd.AddCommand(validateCmd)
2023-01-27 01:10:27 +07:00
}