From 30eef8f7202af3cd09cd371b356d31c97a0573b1 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 15 Mar 2020 00:39:40 +0100 Subject: rename durs to results --- htping.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htping.go b/htping.go index f511464..f933814 100644 --- a/htping.go +++ b/htping.go @@ -110,7 +110,7 @@ type result struct { code int } -func ping(url string, seq int, durs chan result) { +func ping(url string, seq int, results chan result) { start := time.Now() atomic.AddInt32(&ntotal, 1) @@ -120,7 +120,7 @@ func ping(url string, seq int, durs chan result) { req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Printf("error=%v\n", err) - durs <- result{0, -1} + results <- result{0, -1} return } @@ -143,7 +143,7 @@ func ping(url string, seq int, durs chan result) { res, err := client.Do(req) if err != nil { fmt.Printf("error=%v\n", err) - durs <- result{0, -1} + results <- result{0, -1} return } @@ -166,7 +166,7 @@ func ping(url string, seq int, durs chan result) { res.StatusCode, seq, dur) - durs <- result{dur, res.StatusCode} + results <- result{dur, res.StatusCode} } func stats(results chan result, done chan bool) { -- cgit 1.4.1