Preparing report...

Report for github.com/hack0072008/kafka-go

(v1.0.0)

A+    Excellent!    Found 94 issues across 200 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo90%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • message_reader.go
    • Line 384: warning: cyclomatic complexity 21 of function (*messageSetReader).readHeader() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 17 of function (*messageSetReader).readMessageV2() is high (> 15) (gocyclo)
    • client_test.go
    • Line 193: warning: cyclomatic complexity 16 of function TestClientProduceAndConsume() is high (> 15) (gocyclo)
    • reader.go
    • Line 1226: warning: cyclomatic complexity 21 of function (*reader).run() is high (> 15) (gocyclo)
    • Line 612: warning: cyclomatic complexity 18 of function NewReader() is high (> 15) (gocyclo)
    • transport.go
    • Line 333: warning: cyclomatic complexity 19 of function (*connPool).roundTrip() is high (> 15) (gocyclo)
    • Line 963: warning: cyclomatic complexity 17 of function (*connGroup).grabConnOrConnect() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 16 of function (*connPool).update() is high (> 15) (gocyclo)
    • writer.go
    • Line 591: warning: cyclomatic complexity 17 of function (*Writer).WriteMessages() is high (> 15) (gocyclo)
    • consumergroup.go
    • Line 170: warning: cyclomatic complexity 29 of function (*ConsumerGroupConfig).Validate() is high (> 15) (gocyclo)
    • read.go
    • Line 497: warning: cyclomatic complexity 18 of function readFetchResponseHeaderV10() is high (> 15) (gocyclo)
    • error.go
    • Line 154: warning: cyclomatic complexity 83 of function (Error).Title() is high (> 15) (gocyclo)
    • Line 325: warning: cyclomatic complexity 83 of function (Error).Description() is high (> 15) (gocyclo)
    • conn.go
    • Line 1060: warning: cyclomatic complexity 22 of function (*Conn).writeCompressedMessages() is high (> 15) (gocyclo)
    • Line 753: warning: cyclomatic complexity 18 of function (*Conn).ReadBatchWith() is high (> 15) (gocyclo)
    • groupbalancer.go
    • Line 196: warning: cyclomatic complexity 17 of function (*RackAffinityGroupBalancer).assignTopic() is high (> 15) (gocyclo)

golint61%

Golint is a linter for Go source code.

    • testing/conn.go
    • Line 9: warning: exported type ConnWaitGroup should have comment or be unexported (golint)
    • Line 14: warning: exported method ConnWaitGroup.Dial should have comment or be unexported (golint)
    • addpartitionstotxn.go
    • Line 61: warning: comment on exported method Client.AddPartitionsToTxn should be of the form "AddPartitionsToTxn ..." (golint)
    • groupbalancer.go
    • Line 54: warning: exported method RangeGroupBalancer.ProtocolName should have comment or be unexported (golint)
    • Line 58: warning: exported method RangeGroupBalancer.UserData should have comment or be unexported (golint)
    • Line 62: warning: exported method RangeGroupBalancer.AssignGroups should have comment or be unexported (golint)
    • Line 92: warning: comment on exported type RoundRobinGroupBalancer should be of the form "RoundRobinGroupBalancer ..." (with optional leading article) (golint)
    • Line 105: warning: exported method RoundRobinGroupBalancer.ProtocolName should have comment or be unexported (golint)
    • Line 109: warning: exported method RoundRobinGroupBalancer.UserData should have comment or be unexported (golint)
    • Line 113: warning: exported method RoundRobinGroupBalancer.AssignGroups should have comment or be unexported (golint)
    • Line 160: warning: exported method RackAffinityGroupBalancer.ProtocolName should have comment or be unexported (golint)
    • Line 164: warning: exported method RackAffinityGroupBalancer.AssignGroups should have comment or be unexported (golint)
    • Line 192: warning: exported method RackAffinityGroupBalancer.UserData should have comment or be unexported (golint)
    • protocol/listoffsets/listoffsets.go
    • Line 13: warning: exported type Request should have comment or be unexported (golint)
    • Line 19: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 24: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 35: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 37: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 52: warning: exported method Request.Split should have comment or be unexported (golint)
    • Line 94: warning: exported type Response should have comment or be unexported (golint)
    • Line 99: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 104: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 112: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 114: warning: exported method Response.Merge should have comment or be unexported (golint)
    • protocol/initproducerid/initproducerid.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 20: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 22: warning: exported method Request.Transaction should have comment or be unexported (golint)
    • Line 26: warning: exported type Response should have comment or be unexported (golint)
    • Line 37: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/request.go
    • Line 8: warning: exported function ReadRequest should have comment or be unexported (golint)
    • Line 72: warning: exported function WriteRequest should have comment or be unexported (golint)
    • apiversions.go
    • Line 41: warning: exported method Client.ApiVersions should have comment or be unexported (golint)
    • lz4/lz4.go
    • Line 9: warning: exported const Code should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported type CompressionCodec should have comment or be unexported (golint)
    • Line 14: warning: exported function NewCompressionCodec should have comment or be unexported (golint)
    • protocol/prototest/response.go
    • Line 14: warning: exported function TestResponse should have comment or be unexported (golint)
    • Line 44: warning: exported function BenchmarkResponse should have comment or be unexported (golint)
    • consumergroup.go
    • Line 220: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 224: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 228: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 232: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 236: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 240: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 248: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • protocol.go
    • Line 9: warning: exported type ApiVersion should have comment or be unexported (golint)
    • Line 15: warning: exported method ApiVersion.Format should have comment or be unexported (golint)
    • protocol/metadata/metadata.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 16: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 18: warning: exported type Response should have comment or be unexported (golint)
    • Line 27: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 29: warning: exported type ResponseBroker should have comment or be unexported (golint)
    • Line 36: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 44: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • protocol/describegroups/describegroups.go
    • Line 11: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 17: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 19: warning: exported method Request.Group should have comment or be unexported (golint)
    • Line 23: warning: exported method Request.Split should have comment or be unexported (golint)
    • Line 44: warning: exported type Response should have comment or be unexported (golint)
    • Line 49: warning: exported type ResponseGroup should have comment or be unexported (golint)
    • Line 59: warning: exported type ResponseGroupMember should have comment or be unexported (golint)
    • Line 68: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 70: warning: exported method Response.Merge should have comment or be unexported (golint)
    • client.go
    • Line 46: warning: comment on exported type TopicAndGroup should be of the form "TopicAndGroup ..." (with optional leading article) (golint)
    • compression.go
    • Line 9: warning: exported type Compression should have comment or be unexported (golint)
    • Line 12: warning: exported const Gzip should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type CompressionCodec should have comment or be unexported (golint)
    • describegroups.go
    • Line 44: warning: comment on exported type DescribeGroupsResponseMember should be of the form "DescribeGroupsResponseMember ..." (with optional leading article) (golint)
    • Line 62: warning: comment on exported type DescribeGroupsResponseMemberMetadata should be of the form "DescribeGroupsResponseMemberMetadata ..." (with optional leading article) (golint)
    • Line 78: warning: exported type DescribeGroupsResponseMemberMetadataOwnedPartition should have comment or be unexported (golint)
    • Line 86: warning: comment on exported type DescribeGroupsResponseAssignments should be of the form "DescribeGroupsResponseAssignments ..." (with optional leading article) (golint)
    • reader_test.go
    • Line 84: warning: context.Context should be the first parameter of a function (golint)
    • Line 93: warning: context.Context should be the first parameter of a function (golint)
    • Line 114: warning: context.Context should be the first parameter of a function (golint)
    • Line 147: warning: context.Context should be the first parameter of a function (golint)
    • Line 167: warning: context.Context should be the first parameter of a function (golint)
    • Line 204: warning: context.Context should be the first parameter of a function (golint)
    • Line 222: warning: context.Context should be the first parameter of a function (golint)
    • Line 244: warning: context.Context should be the first parameter of a function (golint)
    • Line 428: warning: context.Context should be the first parameter of a function (golint)
    • Line 497: warning: context.Context should be the first parameter of a function (golint)
    • Line 649: warning: context.Context should be the first parameter of a function (golint)
    • Line 655: warning: context.Context should be the first parameter of a function (golint)
    • Line 887: warning: context.Context should be the first parameter of a function (golint)
    • Line 913: warning: context.Context should be the first parameter of a function (golint)
    • Line 935: warning: context.Context should be the first parameter of a function (golint)
    • Line 964: warning: context.Context should be the first parameter of a function (golint)
    • Line 993: warning: context.Context should be the first parameter of a function (golint)
    • Line 1027: warning: context.Context should be the first parameter of a function (golint)
    • Line 1065: warning: context.Context should be the first parameter of a function (golint)
    • Line 1116: warning: context.Context should be the first parameter of a function (golint)
    • gzip/gzip.go
    • Line 13: warning: exported const Code should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type CompressionCodec should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCompressionCodec should have comment or be unexported (golint)
    • Line 23: warning: exported function NewCompressionCodecLevel should have comment or be unexported (golint)
    • protocol/fetch/fetch.go
    • Line 13: warning: exported type Request should have comment or be unexported (golint)
    • Line 26: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 28: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 60: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 65: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 73: warning: exported type RequestForgottenTopic should have comment or be unexported (golint)
    • Line 78: warning: exported type Response should have comment or be unexported (golint)
    • Line 85: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 87: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 92: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 103: warning: exported type ResponseTransaction should have comment or be unexported (golint)
    • Line 112: warning: exported type Error should have comment or be unexported (golint)
    • Line 116: warning: exported function NewError should have comment or be unexported (golint)
    • sasl/plain/plain.go
    • Line 17: warning: exported method Mechanism.Name should have comment or be unexported (golint)
    • Line 21: warning: exported method Mechanism.Start should have comment or be unexported (golint)
    • Line 26: warning: exported method Mechanism.Next should have comment or be unexported (golint)
    • protocol/error.go
    • Line 12: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 42: warning: exported type TopicError should have comment or be unexported (golint)
    • Line 47: warning: exported function NewTopicError should have comment or be unexported (golint)
    • Line 51: warning: exported function NewErrNoTopic should have comment or be unexported (golint)
    • Line 63: warning: exported type TopicPartitionError should have comment or be unexported (golint)
    • Line 69: warning: exported function NewTopicPartitionError should have comment or be unexported (golint)
    • Line 77: warning: exported function NewErrNoPartition should have comment or be unexported (golint)
    • Line 81: warning: exported function NewErrNoLeader should have comment or be unexported (golint)
    • electleaders.go
    • Line 45: warning: exported method Client.ElectLeaders should have comment or be unexported (golint)
    • produce.go
    • Line 17: warning: exported type RequiredAcks should have comment or be unexported (golint)
    • Line 20: warning: exported const RequireNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported method RequiredAcks.MarshalText should have comment or be unexported (golint)
    • Line 42: warning: exported method RequiredAcks.UnmarshalText should have comment or be unexported (golint)
    • protocol/offsetfetch/offsetfetch.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 14: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 16: warning: exported method Request.Group should have comment or be unexported (golint)
    • Line 18: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 27: warning: exported type Response should have comment or be unexported (golint)
    • Line 33: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 35: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 40: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • protocol/cluster.go
    • Line 10: warning: exported type Cluster should have comment or be unexported (golint)
    • Line 17: warning: exported method Cluster.BrokerIDs should have comment or be unexported (golint)
    • Line 28: warning: exported method Cluster.TopicNames should have comment or be unexported (golint)
    • Line 37: warning: exported method Cluster.IsZero should have comment or be unexported (golint)
    • Line 41: warning: exported method Cluster.Format should have comment or be unexported (golint)
    • dialer_test.go
    • Line 38: warning: context.Context should be the first parameter of a function (golint)
    • Line 400: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • protocol/findcoordinator/findcoordinator.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 14: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 16: warning: exported type Response should have comment or be unexported (golint)
    • Line 25: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • batch.go
    • Line 39: warning: comment on exported method Batch.HighWaterMark should be of the form "HighWaterMark ..." (golint)
    • protocol/listgroups/listgroups.go
    • Line 11: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 17: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 19: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 23: warning: exported method Request.Split should have comment or be unexported (golint)
    • Line 37: warning: exported type Response should have comment or be unexported (golint)
    • Line 43: warning: exported type ResponseGroup should have comment or be unexported (golint)
    • Line 51: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 53: warning: exported method Response.Merge should have comment or be unexported (golint)
    • protocol/createtopics/createtopics.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 19: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 21: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 25: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 33: warning: exported type RequestAssignment should have comment or be unexported (golint)
    • Line 38: warning: exported type RequestConfig should have comment or be unexported (golint)
    • Line 43: warning: exported type Response should have comment or be unexported (golint)
    • Line 52: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 54: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 64: warning: exported type ResponseTopicConfig should have comment or be unexported (golint)
    • snappy/snappy.go
    • Line 8: warning: exported type CompressionCodec should have comment or be unexported (golint)
    • Line 10: warning: exported type Framing should have comment or be unexported (golint)
    • Line 13: warning: exported const Code should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported function NewCompressionCodec should have comment or be unexported (golint)
    • Line 22: warning: exported function NewCompressionCodecFraming should have comment or be unexported (golint)
    • protocol/encode.go
    • Line 347: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 362: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 377: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 588: warning: exported function Marshal should have comment or be unexported (golint)
    • protocol/protocol.go
    • Line 21: warning: exported type ApiKey should have comment or be unexported (golint)
    • Line 30: warning: exported method ApiKey.MinVersion should have comment or be unexported (golint)
    • Line 32: warning: exported method ApiKey.MaxVersion should have comment or be unexported (golint)
    • Line 34: warning: exported method ApiKey.SelectVersion should have comment or be unexported (golint)
    • Line 55: warning: exported const Produce should have comment (or a comment on this block) or be unexported (golint)
    • Line 378: warning: exported type Broker should have comment or be unexported (golint)
    • Line 389: warning: exported method Broker.Format should have comment or be unexported (golint)
    • Line 410: warning: exported type Topic should have comment or be unexported (golint)
    • Line 416: warning: exported type Partition should have comment or be unexported (golint)
    • conn.go
    • Line 129: warning: exported type IsolationLevel should have comment or be unexported (golint)
    • Line 132: warning: exported const ReadUncommitted should have comment (or a comment on this block) or be unexported (golint)
    • Line 606: warning: exported const SeekStart should have comment (or a comment on this block) or be unexported (golint)
    • Line 611: warning: comment on exported const SeekDontCheck should be of the form "SeekDontCheck ..." (golint)
    • Line 1378: warning: exported method Conn.ApiVersions should have comment or be unexported (golint)
    • createpartitions.go
    • Line 76: warning: exported type TopicPartitionsConfig should have comment or be unexported (golint)
    • Line 100: warning: exported type TopicPartitionAssignment should have comment or be unexported (golint)
    • record.go
    • Line 38: warning: comment on exported function NewRecordReader should be of the form "NewRecordReader ..." (golint)
    • protocol/addoffsetstotxn/addoffsetstotxn.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 20: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 22: warning: exported method Request.Transaction should have comment or be unexported (golint)
    • Line 26: warning: exported type Response should have comment or be unexported (golint)
    • Line 35: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/response.go
    • Line 8: warning: exported function ReadResponse should have comment or be unexported (golint)
    • Line 64: warning: exported function WriteResponse should have comment or be unexported (golint)
    • describeconfigs.go
    • Line 27: warning: exported type ResourceType should have comment or be unexported (golint)
    • Line 30: warning: comment on exported const ResourceTypeUnknown should be of the form "ResourceTypeUnknown ..." (golint)
    • Line 32: warning: exported const ResourceTypeTopic should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type DescribeConfigRequestResource should have comment or be unexported (golint)
    • Line 56: warning: comment on exported type DescribeConfigResponseResource should be of the form "DescribeConfigResponseResource ..." (with optional leading article) (golint)
    • Line 71: warning: comment on exported type DescribeConfigResponseConfigEntry should be of the form "DescribeConfigResponseConfigEntry ..." (with optional leading article) (golint)
    • Line 95: warning: comment on exported type DescribeConfigResponseConfigSynonym should be of the form "DescribeConfigResponseConfigSynonym ..." (with optional leading article) (golint)
    • incrementalalterconfigs.go
    • Line 10: warning: exported type ConfigOperation should have comment or be unexported (golint)
    • Line 13: warning: exported const ConfigOperationSet should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported method Client.IncrementalAlterConfigs should have comment or be unexported (golint)
    • offsetcommit.go
    • Line 49: warning: comment on exported type OffsetCommitResponse should be of the form "OffsetCommitResponse ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported type OffsetCommitPartition should be of the form "OffsetCommitPartition ..." (with optional leading article) (golint)
    • protocol/describeconfigs/describeconfigs.go
    • Line 17: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 24: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 26: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 42: warning: exported method Request.Split should have comment or be unexported (golint)
    • Line 70: warning: exported type RequestResource should have comment or be unexported (golint)
    • Line 76: warning: exported type Response should have comment or be unexported (golint)
    • Line 81: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 83: warning: exported method Response.Merge should have comment or be unexported (golint)
    • Line 100: warning: exported type ResponseResource should have comment or be unexported (golint)
    • Line 108: warning: exported type ResponseConfigEntry should have comment or be unexported (golint)
    • Line 120: warning: exported type ResponseConfigSynonym should have comment or be unexported (golint)
    • protocol/alterconfigs/alterconfigs.go
    • Line 9: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 15: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 17: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 21: warning: exported type RequestResources should have comment or be unexported (golint)
    • Line 27: warning: exported type RequestConfig should have comment or be unexported (golint)
    • Line 32: warning: exported type Response should have comment or be unexported (golint)
    • Line 37: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 39: warning: exported type ResponseResponses should have comment or be unexported (golint)
    • protocol/saslauthenticate/saslauthenticate.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 13: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 15: warning: exported type Response should have comment or be unexported (golint)
    • Line 22: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • reader.go
    • Line 17: warning: exported const LastOffset should have comment (or a comment on this block) or be unexported (golint)
    • Line 517: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 521: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 525: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 541: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 545: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 549: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • protocol/offsetcommit/offsetcommit.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 18: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 20: warning: exported method Request.Group should have comment or be unexported (golint)
    • Line 22: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 27: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 39: warning: exported type Response should have comment or be unexported (golint)
    • Line 44: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 46: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 51: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • protocol/endtxn/endtxn.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 20: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 22: warning: exported method Request.Transaction should have comment or be unexported (golint)
    • Line 26: warning: exported type Response should have comment or be unexported (golint)
    • Line 35: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/incrementalalterconfigs/incrementalalterconfigs.go
    • Line 18: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 24: warning: exported type RequestResource should have comment or be unexported (golint)
    • Line 30: warning: exported type RequestConfig should have comment or be unexported (golint)
    • Line 36: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 38: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 67: warning: exported type Response should have comment or be unexported (golint)
    • Line 72: warning: exported type ResponseAlterResponse should have comment or be unexported (golint)
    • Line 79: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • metadata.go
    • Line 22: warning: comment on exported type MetadataResponse should be of the form "MetadataResponse ..." (with optional leading article) (golint)
    • protocol/heartbeat/heartbeat.go
    • Line 9: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 21: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 25: warning: exported type Response should have comment or be unexported (golint)
    • Line 34: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/prototest/request.go
    • Line 14: warning: exported function TestRequest should have comment or be unexported (golint)
    • Line 49: warning: exported function BenchmarkRequest should have comment or be unexported (golint)
    • protocol/conn.go
    • Line 11: warning: exported type Conn should have comment or be unexported (golint)
    • Line 19: warning: exported function NewConn should have comment or be unexported (golint)
    • Line 31: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 35: warning: exported method Conn.Discard should have comment or be unexported (golint)
    • Line 39: warning: exported method Conn.Peek should have comment or be unexported (golint)
    • Line 51: warning: exported method Conn.LocalAddr should have comment or be unexported (golint)
    • Line 55: warning: exported method Conn.RemoteAddr should have comment or be unexported (golint)
    • Line 59: warning: exported method Conn.SetDeadline should have comment or be unexported (golint)
    • Line 63: warning: exported method Conn.SetReadDeadline should have comment or be unexported (golint)
    • Line 67: warning: exported method Conn.SetWriteDeadline should have comment or be unexported (golint)
    • Line 71: warning: exported method Conn.SetVersions should have comment or be unexported (golint)
    • Line 81: warning: exported method Conn.RoundTrip should have comment or be unexported (golint)
    • logger.go
    • Line 17: warning: exported method LoggerFunc.Printf should have comment or be unexported (golint)
    • protocol/createpartitions/createpartitions.go
    • Line 9: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 17: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 19: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 23: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 29: warning: exported type RequestAssignment should have comment or be unexported (golint)
    • Line 33: warning: exported type Response should have comment or be unexported (golint)
    • Line 38: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 40: warning: exported type ResponseResult should have comment or be unexported (golint)
    • protocol/saslhandshake/saslhandshake.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 13: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 15: warning: exported type Response should have comment or be unexported (golint)
    • Line 20: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • zstd/zstd.go
    • Line 9: warning: exported const Code should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type CompressionCodec should have comment or be unexported (golint)
    • Line 15: warning: exported function NewCompressionCodec should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCompressionCodecWith should have comment or be unexported (golint)
    • protocol/record_batch.go
    • Line 189: warning: exported function ReadControlRecord should have comment or be unexported (golint)
    • Line 225: warning: exported method ControlRecord.Key should have comment or be unexported (golint)
    • Line 232: warning: exported method ControlRecord.Value should have comment or be unexported (golint)
    • Line 236: warning: exported method ControlRecord.Record should have comment or be unexported (golint)
    • Line 270: warning: exported method ControlBatch.ReadRecord should have comment or be unexported (golint)
    • Line 274: warning: exported method ControlBatch.ReadControlRecord should have comment or be unexported (golint)
    • Line 288: warning: exported method ControlBatch.Offset should have comment or be unexported (golint)
    • Line 292: warning: exported method ControlBatch.Version should have comment or be unexported (golint)
    • Line 308: warning: exported method RecordBatch.ReadRecord should have comment or be unexported (golint)
    • Line 312: warning: exported method RecordBatch.Offset should have comment or be unexported (golint)
    • Line 316: warning: exported method RecordBatch.Version should have comment or be unexported (golint)
    • Line 328: warning: exported method MessageSet.ReadRecord should have comment or be unexported (golint)
    • Line 332: warning: exported method MessageSet.Offset should have comment or be unexported (golint)
    • Line 336: warning: exported method MessageSet.Version should have comment or be unexported (golint)
    • Line 348: warning: exported method RecordStream.ReadRecord should have comment or be unexported (golint)
    • balancer.go
    • Line 140: warning: exported method Hash.Balance should have comment or be unexported (golint)
    • Line 201: warning: exported method CRC32Balancer.Balance should have comment or be unexported (golint)
    • Line 238: warning: exported method Murmur2Balancer.Balance should have comment or be unexported (golint)
    • createtopics.go
    • Line 13: warning: comment on exported type CreateTopicsRequest should be of the form "CreateTopicsRequest ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type CreateTopicsResponse should be of the form "CreateTopicsResponse ..." (with optional leading article) (golint)
    • Line 85: warning: exported type ConfigEntry should have comment or be unexported (golint)
    • Line 112: warning: exported type ReplicaAssignment should have comment or be unexported (golint)
    • Line 165: warning: exported type TopicConfig should have comment or be unexported (golint)
    • listgroups.go
    • Line 36: warning: exported method Client.ListGroups should have comment or be unexported (golint)
    • protocol/electleaders/electleaders.go
    • Line 9: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 16: warning: exported type RequestTopicPartitions should have comment or be unexported (golint)
    • Line 21: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 23: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 27: warning: exported type Response should have comment or be unexported (golint)
    • Line 33: warning: exported type ResponseReplicaElectionResult should have comment or be unexported (golint)
    • Line 38: warning: exported type ResponsePartitionResult should have comment or be unexported (golint)
    • Line 44: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/deletetopics/deletetopics.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 14: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 16: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 20: warning: exported type Response should have comment or be unexported (golint)
    • Line 25: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 27: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • addoffsetstotxn.go
    • Line 44: warning: comment on exported method Client.AddOffsetsToTxn should be of the form "AddOffsetsToTxn ..." (golint)
    • alterconfigs.go
    • Line 25: warning: exported type AlterConfigRequestResource should have comment or be unexported (golint)
    • Line 36: warning: exported type AlterConfigRequestConfig should have comment or be unexported (golint)
    • Line 57: warning: comment on exported type AlterConfigsResponseResource should be of the form "AlterConfigsResponseResource ..." (with optional leading article) (golint)
    • protocol/addpartitionstotxn/addpartitionstotxn.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 20: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 29: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 31: warning: exported method Request.Transaction should have comment or be unexported (golint)
    • Line 35: warning: exported type Response should have comment or be unexported (golint)
    • Line 44: warning: exported type ResponseResult should have comment or be unexported (golint)
    • Line 53: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 62: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • compress/compress.go
    • Line 20: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported method Compression.Codec should have comment or be unexported (golint)
    • Line 41: warning: exported method Compression.MarshalText should have comment or be unexported (golint)
    • Line 45: warning: exported method Compression.UnmarshalText should have comment or be unexported (golint)
    • Line 104: warning: comment on exported var GzipCodec should be of the form "GzipCodec ..." (golint)
    • Line 107: warning: comment on exported var SnappyCodec should be of the form "SnappyCodec ..." (golint)
    • Line 110: warning: comment on exported var Lz4Codec should be of the form "Lz4Codec ..." (golint)
    • Line 113: warning: comment on exported var ZstdCodec should be of the form "ZstdCodec ..." (golint)
    • Line 116: warning: comment on exported var Codecs should be of the form "Codecs ..." (golint)
    • protocol/produce/produce.go
    • Line 13: warning: exported type Request should have comment or be unexported (golint)
    • Line 20: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 22: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 54: warning: exported method Request.Prepare should have comment or be unexported (golint)
    • Line 87: warning: exported method Request.HasResponse should have comment or be unexported (golint)
    • Line 91: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 96: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 101: warning: exported type Response should have comment or be unexported (golint)
    • Line 106: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 108: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 113: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 123: warning: exported type ResponseError should have comment or be unexported (golint)
    • Line 133: warning: exported type Error should have comment or be unexported (golint)
    • Line 137: warning: exported function NewError should have comment or be unexported (golint)
    • protocol/record.go
    • Line 17: warning: exported const Gzip should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported method Attributes.Compression should have comment or be unexported (golint)
    • Line 29: warning: exported method Attributes.Transactional should have comment or be unexported (golint)
    • Line 33: warning: exported method Attributes.Control should have comment or be unexported (golint)
    • txnoffsetcommit.go
    • Line 58: warning: comment on exported type TxnOffsetCommitResponse should be of the form "TxnOffsetCommitResponse ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type TxnOffsetCommitPartition should be of the form "TxnOffsetCommitPartition ..." (with optional leading article) (golint)
    • protocol/apiversions/apiversions.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 13: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 15: warning: exported type Response should have comment or be unexported (golint)
    • Line 21: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • Line 23: warning: exported type ApiKeyResponse should have comment or be unexported (golint)
    • protocol/txnoffsetcommit/txnoffsetcommit.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 24: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 33: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 44: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 46: warning: exported method Request.Group should have comment or be unexported (golint)
    • Line 50: warning: exported type Response should have comment or be unexported (golint)
    • Line 59: warning: exported type ResponseTopic should have comment or be unexported (golint)
    • Line 68: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 77: warning: exported method Response.ApiKey should have comment or be unexported (golint)
    • protocol/decode.go
    • Line 222: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 230: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 238: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 246: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 254: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 263: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 271: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 280: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 288: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 499: warning: exported function Unmarshal should have comment or be unexported (golint)
    • error.go
    • Line 15: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 541: warning: exported type MessageTooLargeError should have comment or be unexported (golint)
    • Line 570: warning: comment on exported type WriteErrors should be of the form "WriteErrors ..." (with optional leading article) (golint)
    • protocol/alterpartitionreassignments/alterpartitionreassignments.go
    • Line 9: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 19: warning: exported type RequestTopic should have comment or be unexported (golint)
    • Line 24: warning: exported type RequestPartition should have comment or be unexported (golint)
    • Line 29: warning: exported method Request.ApiKey should have comment or be unexported (golint)
    • Line 33: warning: exported method Request.Broker should have comment or be unexported (golint)
    • Line 37: warning: exported type Response should have comment or be unexported (golint)
    • Line 48: warning: exported type ResponseResult should have comment or be unexported (golint)
    • Line 53: warning: exported type ResponsePartition should have comment or be unexported (golint)
    • Line 59: warning: exported method Response.ApiKey should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words