dae/cmd/cmd.go

29 lines
566 B
Go
Raw Normal View History

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