Skip to content

Commit

Permalink
Updating the help docs for the header params in the listen command. (#…
Browse files Browse the repository at this point in the history
…664)

A user opened an issue recently because they were getting an index out of bounds error when trying to use the headers param.
They were using the wrong delimiter for separating the Key and Value of the header, updating the docs to make that more clear for the users.

#662
  • Loading branch information
gracegoo-stripe committed May 11, 2021
1 parent 37deb29 commit ede67f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Stripe account.`,
RunE: lc.runListenCmd,
}

lc.cmd.Flags().StringSliceVar(&lc.forwardConnectHeaders, "connect-headers", []string{}, "A comma-separated list of custom headers to forward for Connect")
lc.cmd.Flags().StringSliceVar(&lc.forwardConnectHeaders, "connect-headers", []string{}, "A comma-separated list of custom headers to forward for Connect. Ex: \"Key1:Value1, Key2:Value2\"")
lc.cmd.Flags().StringSliceVarP(&lc.events, "events", "e", []string{"*"}, "A comma-separated list of specific events to listen for. For a list of all possible events, see: https://stripe.com/docs/api/events/types")
lc.cmd.Flags().StringVarP(&lc.forwardURL, "forward-to", "f", "", "The URL to forward webhook events to")
lc.cmd.Flags().StringSliceVarP(&lc.forwardHeaders, "headers", "H", []string{}, "A comma-separated list of custom headers to forward")
lc.cmd.Flags().StringSliceVarP(&lc.forwardHeaders, "headers", "H", []string{}, "A comma-separated list of custom headers to forward. Ex: \"Key1:Value1, Key2:Value2\"")
lc.cmd.Flags().StringVarP(&lc.forwardConnectURL, "forward-connect-to", "c", "", "The URL to forward Connect webhook events to (default: same as normal events)")
lc.cmd.Flags().BoolVarP(&lc.latestAPIVersion, "latest", "l", false, "Receive events formatted with the latest API version (default: your account's default API version)")
lc.cmd.Flags().BoolVar(&lc.livemode, "live", false, "Receive live events (default: test)")
Expand Down

0 comments on commit ede67f9

Please sign in to comment.