소스 검색

golint: use CoordinatorID instead of CoordinatorId as variable name.

Willem van Bergen 10 년 전
부모
커밋
e91bb557fd
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      consumer_metadata_response.go
  2. 2 2
      consumer_metadata_response_test.go

+ 2 - 2
consumer_metadata_response.go

@@ -2,7 +2,7 @@ package sarama
 
 type ConsumerMetadataResponse struct {
 	Err             KError
-	CoordinatorId   int32
+	CoordinatorID   int32
 	CoordinatorHost string
 	CoordinatorPort int32
 }
@@ -14,7 +14,7 @@ func (r *ConsumerMetadataResponse) decode(pd packetDecoder) (err error) {
 	}
 	r.Err = KError(tmp)
 
-	r.CoordinatorId, err = pd.getInt32()
+	r.CoordinatorID, err = pd.getInt32()
 	if err != nil {
 		return err
 	}

+ 2 - 2
consumer_metadata_response_test.go

@@ -25,7 +25,7 @@ func TestConsumerMetadataResponseError(t *testing.T) {
 		t.Error("Decoding produced incorrect error value.")
 	}
 
-	if response.CoordinatorId != 0 {
+	if response.CoordinatorID != 0 {
 		t.Error("Decoding produced incorrect ID.")
 	}
 
@@ -47,7 +47,7 @@ func TestConsumerMetadataResponseSuccess(t *testing.T) {
 		t.Error("Decoding produced error value where there was none.")
 	}
 
-	if response.CoordinatorId != 0xAB {
+	if response.CoordinatorID != 0xAB {
 		t.Error("Decoding produced incorrect coordinator ID.")
 	}