Skip to content

Commit ed32d8a

Browse files
authored
Merge pull request #62 from hookdeck/chore/improve-listen-usage-txt
chore: improve listen usage text
2 parents 0dfa47b + 6bbfe3e commit ed32d8a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/cmd/listen.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -39,7 +39,7 @@ func newListenCmd() *listenCmd {
3939
Short: "Forward webhooks for a source to your local server",
4040
Args: func(cmd *cobra.Command, args []string) error {
4141
if len(args) < 1 {
42-
return errors.New("Requires a port or forwarding URL to foward the webhooks to")
42+
return errors.New("Requires a port or forwarding URL to forward the webhooks to")
4343
}
4444

4545
_, err_port := strconv.ParseInt(args[0], 10, 64)
@@ -76,6 +76,13 @@ func newListenCmd() *listenCmd {
7676
}
7777
lc.cmd.Flags().BoolVar(&lc.noWSS, "no-wss", false, "Force unencrypted ws:// protocol instead of wss://")
7878

79+
lc.cmd.SetUsageTemplate(
80+
strings.Replace(
81+
lc.cmd.UsageTemplate(),
82+
"{{.UseLine}}",
83+
"hookdeck listen [port or forwarding URL] [source] [connection] [flags]", 1),
84+
)
85+
7986
return lc
8087
}
8188

0 commit comments

Comments
 (0)