Skip to content

Commit

Permalink
refactor: clean up help message
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Mar 15, 2021
1 parent 97f5c60 commit 253ca31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func request(args []string) {
verboseFlag := cmd.Bool("verbose", false, "Print both headers and body.")
headersFlag := cmd.Bool("headers", false, "Print only the headers.")
allowBinaryFlag := cmd.Bool("allowBinary", false, "Set to true to enable printing binary to the console.")
readTimeoutFlag := cmd.Duration("readTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s (default is 5 seconds).")
writeTimeoutFlag := cmd.Duration("writeTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s (default is 5 seconds).")
readTimeoutFlag := cmd.Duration("readTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s.")
writeTimeoutFlag := cmd.Duration("writeTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s.")
helpFlag := cmd.Bool("help", false, "Print help and exit.")
err := cmd.Parse(args)
if err != nil || *helpFlag {
Expand Down Expand Up @@ -169,8 +169,8 @@ func serve(args []string) {
domainFlag := cmd.String("domain", "localhost", "The domain to listen on.")
pathFlag := cmd.String("path", ".", "Path containing content.")
portFlag := cmd.Int("port", 1965, "Address to listen on.")
readTimeoutFlag := cmd.Duration("readTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s (default is 5 seconds).")
writeTimeoutFlag := cmd.Duration("writeTimeout", time.Second*10, "Set the duration, e.g. 1m or 5s (default is 10 seconds).")
readTimeoutFlag := cmd.Duration("readTimeout", time.Second*5, "Set the duration, e.g. 1m or 5s.")
writeTimeoutFlag := cmd.Duration("writeTimeout", time.Second*10, "Set the duration, e.g. 1m or 5s.")
helpFlag := cmd.Bool("help", false, "Print help and exit.")
err := cmd.Parse(args)
if err != nil || *helpFlag {
Expand Down

0 comments on commit 253ca31

Please sign in to comment.