Skip to content

Commit

Permalink
fix staticcheck warnings (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmen authored and olivere committed Sep 15, 2017
1 parent 767f466 commit 038907a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,11 @@ func TestExponentialBackoff(t *testing.T) {
t.Errorf("expected [%v..%v], got %v", 8, 256, got)
}

got, ok = b.Next(5)
if ok {
if _, ok := b.Next(5); ok {
t.Fatalf("expected %v, got %v", false, ok)
}

got, ok = b.Next(6)
if ok {
if _, ok = b.Next(6); ok {
t.Fatalf("expected %v, got %v", false, ok)
}
}
2 changes: 0 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,6 @@ func (c *Client) healthcheck(timeout time.Duration, force bool) {
case <-ctx.Done(): // timeout
c.errorf("elastic: %s is dead", conn.URL())
conn.MarkAsDead()
break
case err := <-errc:
if err != nil {
c.errorf("elastic: %s is dead", conn.URL())
Expand All @@ -1072,7 +1071,6 @@ func (c *Client) healthcheck(timeout time.Duration, force bool) {
conn.MarkAsDead()
c.errorf("elastic: %s is dead [status=%d]", conn.URL(), status)
}
break
}
}
}
Expand Down

0 comments on commit 038907a

Please sign in to comment.