소스 검색

make linter happy

Diego Alvarez 3 년 전
부모
커밋
aff81dac91
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      consumer_test.go
  2. 1 1
      functional_producer_test.go

+ 4 - 4
consumer_test.go

@@ -1406,7 +1406,7 @@ func TestConsumerInterceptors(t *testing.T) {
 				ev, _ := testMsg.Encode()
 				expected := string(ev) + strconv.Itoa(i)
 				v := string(msg.Value)
-				if string(v) != expected {
+				if v != expected {
 					t.Errorf("Interceptor should have incremented the value, got %s, expected %s", v, expected)
 				}
 			},
@@ -1418,7 +1418,7 @@ func TestConsumerInterceptors(t *testing.T) {
 				ev, _ := testMsg.Encode()
 				expected := string(ev) + strconv.Itoa(i) + strconv.Itoa(i+1000)
 				v := string(msg.Value)
-				if string(v) != expected {
+				if v != expected {
 					t.Errorf("Interceptor should have incremented the value, got %s, expected %s", v, expected)
 				}
 			},
@@ -1430,7 +1430,7 @@ func TestConsumerInterceptors(t *testing.T) {
 				ev, _ := testMsg.Encode()
 				expected := string(ev) + strconv.Itoa(i+1000)
 				v := string(msg.Value)
-				if string(v) != expected {
+				if v != expected {
 					t.Errorf("Interceptor should have not changed the value, got %s, expected %s", v, expected)
 				}
 			},
@@ -1442,7 +1442,7 @@ func TestConsumerInterceptors(t *testing.T) {
 				ev, _ := testMsg.Encode()
 				expected := string(ev)
 				v := string(msg.Value)
-				if string(v) != expected {
+				if v != expected {
 					t.Errorf("Interceptor should have incremented the value, got %s, expected %s", v, expected)
 				}
 			},

+ 1 - 1
functional_producer_test.go

@@ -247,7 +247,7 @@ func TestInterceptors(t *testing.T) {
 			// consumer interceptor: strconv.Itoa(i+20)
 			expected := TestMessage + strconv.Itoa(i) + strconv.Itoa(i+100) + strconv.Itoa(i+20)
 			v := string(msg.Value)
-			if string(v) != expected {
+			if v != expected {
 				t.Errorf("Interceptor should have incremented the value, got %s, expected %s", v, expected)
 			}
 		}