mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client v2: rename error var for revive
The revive tool complained durring the build. Error variable has been renamed. Fixes #12718 Signed-off-by: David Lanouette <David.Lanouette@GMail.com>
This commit is contained in:
@@ -521,14 +521,14 @@ type simpleHTTPClient struct {
|
||||
headerTimeout time.Duration
|
||||
}
|
||||
|
||||
// NoRequestError indicates that the HTTPRequest object could not be found
|
||||
// ErrNoRequest indicates that the HTTPRequest object could not be found
|
||||
// or was nil. No processing could continue.
|
||||
var NoRequestError = errors.New("No HTTPRequest was available")
|
||||
var ErrNoRequest = errors.New("No HTTPRequest was available")
|
||||
|
||||
func (c *simpleHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) {
|
||||
req := act.HTTPRequest(c.endpoint)
|
||||
if req == nil {
|
||||
return nil, nil, NoRequestError
|
||||
return nil, nil, ErrNoRequest
|
||||
}
|
||||
|
||||
if err := printcURL(req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user