mirror of
https://github.com/Octops/quake-kube.git
synced 2026-04-12 21:20:42 +00:00
Initial commit
This commit is contained in:
38
cmd/q3/main.go
Normal file
38
cmd/q3/main.go
Normal file
@ -0,0 +1,38 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
q3cmd "github.com/criticalstack/quake-kube/cmd/q3/app/cmd"
|
||||
q3content "github.com/criticalstack/quake-kube/cmd/q3/app/content"
|
||||
q3proxy "github.com/criticalstack/quake-kube/cmd/q3/app/proxy"
|
||||
q3server "github.com/criticalstack/quake-kube/cmd/q3/app/server"
|
||||
)
|
||||
|
||||
var global struct {
|
||||
Verbosity int
|
||||
}
|
||||
|
||||
func NewRootCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "q3",
|
||||
Short: "",
|
||||
}
|
||||
cmd.AddCommand(
|
||||
q3cmd.NewCommand(),
|
||||
q3content.NewCommand(),
|
||||
q3proxy.NewCommand(),
|
||||
q3server.NewCommand(),
|
||||
)
|
||||
|
||||
cmd.PersistentFlags().CountVarP(&global.Verbosity, "verbose", "v", "log output verbosity")
|
||||
return cmd
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := NewRootCommand().Execute(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user