Skip to content

Commit

Permalink
Update usage to go up to 511 and update README with some info
Browse files Browse the repository at this point in the history
  • Loading branch information
rpearce committed Sep 18, 2022
1 parent cf44b67 commit ab3f9e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# httpwut

CLI tool to look up HTTP status codes.
CLI tool get HTTP status code information.

_Probably not for other people to use._
_This is a tool for me to learn Go, so you probably shouldn't use this._

```
λ httpwut -h
Get HTTP status code information
usage: httpwut [100..511] [-v|--verbose] [-c|--cats] [-d|--dogs]
λ httpwut 502
502 - Bad Gateway
λ httpwut 502 --verbose
502 - Bad Gateway
The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway
```

Passing `--cats` and/or `--dogs` (you can do both at the time same) will open
the status codes on https://http.cats and https://httpstatusdogs.com,
respectively.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func usage() {
fmt.Println("Get HTTP status code information")
fmt.Printf("usage: %s [100..505] [-v|--verbose] [-c|--cats] [-d|--dogs]\n", os.Args[0])
fmt.Printf("usage: %s [100..511] [-v|--verbose] [-c|--cats] [-d|--dogs]\n", os.Args[0])
}

const helpUsage = "Print usage information"
Expand Down

0 comments on commit ab3f9e0

Please sign in to comment.