Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bai committed Dec 23, 2024
1 parent 502501f commit b03034b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ linters-settings:
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: errorf
- name: empty-block
- name: superfluous-else
# - name: unused-parameter
Expand Down Expand Up @@ -83,7 +83,7 @@ linters:
- ineffassign
- misspell
- nakedret
- exportloopref
- copyloopvar
- staticcheck
# - structcheck
- stylecheck
Expand Down
2 changes: 1 addition & 1 deletion core/internal/helpers/sarama_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestInitSaramaLogging(t *testing.T) {
func shouldPanicForVersion(t *testing.T, v string) {
defer func() { recover() }()
out := parseKafkaVersion(v)
t.Errorf("Kafka version " + v + " should have panicked, but got: " + out.String())
t.Errorf("Kafka version %s should have panicked, but got: %s", v, out.String())
}

func TestVersionMapping(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/internal/helpers/zookeeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func newTLSDialer(addr, caFile, certFile, keyFile string) (zk.Dialer, error) {
RootCAs: caCertPool,
}

if len(certFile) > 0 && len(keyFile) > 0 {
if certFile != "" && keyFile != "" {
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
return nil, errors.New("cannot read TLS certificate or key file: " + err.Error())
Expand Down

0 comments on commit b03034b

Please sign in to comment.