From bb55008451e9b53df5d10d769e6d6469d8d156f8 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Thu, 18 Aug 2022 17:13:38 -0400 Subject: [PATCH] http -> http bind, part 2 (#32) --- cmd/zrok/http.go | 6 +++--- cmd/zrok/main.go | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cmd/zrok/http.go b/cmd/zrok/http.go index 9e7e639e..b5053891 100644 --- a/cmd/zrok/http.go +++ b/cmd/zrok/http.go @@ -24,7 +24,7 @@ import ( ) func init() { - rootCmd.AddCommand(newHttpBindCommand().cmd) + httpCmd.AddCommand(newHttpBindCommand().cmd) } type httpBindCommand struct { @@ -35,8 +35,8 @@ type httpBindCommand struct { func newHttpBindCommand() *httpBindCommand { cmd := &cobra.Command{ - Use: "http ", - Short: "Start an HTTP terminator", + Use: "bind ", + Short: "Create an HTTP binding", Args: cobra.ExactArgs(1), } command := &httpBindCommand{cmd: cmd} diff --git a/cmd/zrok/main.go b/cmd/zrok/main.go index d36bec81..fb3b81b8 100644 --- a/cmd/zrok/main.go +++ b/cmd/zrok/main.go @@ -13,6 +13,7 @@ func init() { pfxlog.GlobalInit(logrus.InfoLevel, pfxlog.DefaultOptions().SetTrimPrefix("github.com/openziti-test-kitchen/")) rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "enable verbose logging") rootCmd.PersistentFlags().StringVarP(&endpoint, "endpoint", "e", "localhost:10888", "zrok endpoint address") + rootCmd.AddCommand(httpCmd) } var rootCmd = &cobra.Command{ @@ -27,6 +28,11 @@ var rootCmd = &cobra.Command{ var verbose bool var endpoint string +var httpCmd = &cobra.Command{ + Use: "http", + Short: "HTTP endpoint operations", +} + func main() { if err := rootCmd.Execute(); err != nil { panic(err)