Browse Source

lease/leasehttp: remove "strings.Compare != 0"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
48f28b9d27
1 changed files with 1 additions and 2 deletions
  1. 1 2
      lease/leasehttp/http_test.go

+ 1 - 2
lease/leasehttp/http_test.go

@@ -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())
 	}
 }