Skip to content

Commit b44b775

Browse files
committed
fix: lint issues from staticcheck
1 parent dcdfa52 commit b44b775

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

internal/kafka_executable/kafka_executable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func NewKafkaExecutable(stageHarness *test_case_harness.TestCaseHarness) *KafkaE
2929

3030
func (b *KafkaExecutable) Run(args ...string) error {
3131
b.args = args
32-
if b.args == nil || len(b.args) == 0 {
32+
if len(b.args) == 0 {
3333
b.logger.Infof("$ ./%s", path.Base(b.executable.Path))
3434
} else {
3535
var log string

protocol/api/api_versions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func DecodeApiVersionsHeader(response []byte, version int16) (*ResponseHeader, e
5252
return &responseHeader, nil
5353
}
5454

55+
// DecodeApiVersionsHeaderAndResponse decodes the header and response
5556
// If an error is encountered while decoding, the returned objects are nil
5657
func DecodeApiVersionsHeaderAndResponse(response []byte, version int16) (*ResponseHeader, *ApiVersionsResponse, error) {
5758
decoder := decoder.RealDecoder{}

protocol/broker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ func (b *Broker) ConnectWithRetries(executable *kafka_executable.KafkaExecutable
6868
}
6969

7070
// Don't print errors in the first second
71-
if retries > 2 {
72-
// ToDo: fixtures fail
73-
// logger.Infof("Failed to connect to broker at %s, retrying in 1s", b.addr)
74-
}
71+
// ToDo: fixtures fail
72+
// if retries > 2 {
73+
// logger.Infof("Failed to connect to broker at %s, retrying in 1s", b.addr)
74+
// }
7575

7676
retries += 1
7777
time.Sleep(1000 * time.Millisecond)

protocol/encoder/real_encoder.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func (re *RealEncoder) PutCompactString(in string) {
108108
func (re *RealEncoder) PutNullableCompactString(in *string) {
109109
if in == nil {
110110
re.PutInt8(0)
111+
return
111112
}
112113
re.PutCompactString(*in)
113114
}

0 commit comments

Comments
 (0)