Skip to content

Commit

Permalink
Close response body
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Nov 1, 2018
1 parent 10a9072 commit 29f9297
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func main() {
n := flag.Uint("n", 12, "Number of requests")
h := flag.String("u", "https://google.com", "Host URL")
h := flag.String("u", "https://www.google.com", "Host URL")
flag.Parse()

lo, hi := math.Inf(-1), math.Inf(+1)
Expand All @@ -22,6 +22,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
resp.Body.Close()
date := resp.Header.Get("Date")
t2, err := time.Parse(time.RFC1123, date)
if err != nil {
Expand Down

0 comments on commit 29f9297

Please # to comment.