lease/leasehttp: remove "strings.Compare != 0"
@@ -19,7 +19,6 @@ import (
"net/http"
"net/http/httptest"
"os"
- "strings"
"testing"
"time"
@@ -110,7 +109,7 @@ func testApplyTimeout(t *testing.T, f func(*lease.Lease, string) error) {
if err == nil {
t.Fatalf("expected timeout error, got nil")
}
- if strings.Compare(err.Error(), ErrLeaseHTTPTimeout.Error()) != 0 {
+ if err.Error() != ErrLeaseHTTPTimeout.Error() {
t.Fatalf("expected (%v), got (%v)", ErrLeaseHTTPTimeout.Error(), err.Error())
}
}
