Clarify code in HTTPUClient.Do.
The previous code was misleading by returning the `err` variable rather than an explicit `nil`. This code path was actually the success path. Functionally it was correct as that specific scoping of `err` could only be `nil` if that line of code was reached.
This commit is contained in:
parent
167b9766e5
commit
1395d14473
@ -128,5 +128,7 @@ func (httpu *HTTPUClient) Do(req *http.Request, timeout time.Duration, numSends
|
||||
|
||||
responses = append(responses, response)
|
||||
}
|
||||
return responses, err
|
||||
|
||||
// Timeout reached - return discovered responses.
|
||||
return responses, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user