Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
Subjects() has been deprecated in Go 1.18:
golang/go#46287
  • Loading branch information
ronensc committed Feb 20, 2023
1 parent af8ec46 commit 6c0470e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/pipeline/encode/encode_kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func Test_TLSConfigCA(t *testing.T) {

require.Empty(t, tlsConfig.Certificates)
require.NotNil(t, tlsConfig.RootCAs)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1) //nolint:staticcheck
}

func Test_MutualTLSConfig(t *testing.T) {
Expand All @@ -143,5 +143,5 @@ func Test_MutualTLSConfig(t *testing.T) {
require.NotEmpty(t, tlsConfig.Certificates[0].Certificate)
require.NotNil(t, tlsConfig.Certificates[0].PrivateKey)
require.NotNil(t, tlsConfig.RootCAs)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1) //nolint:staticcheck
}
4 changes: 2 additions & 2 deletions pkg/pipeline/ingest/ingest_kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func Test_TLSConfigCA(t *testing.T) {

require.Empty(t, tlsConfig.Certificates)
require.NotNil(t, tlsConfig.RootCAs)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1) //nolint:staticcheck
}

func Test_MutualTLSConfig(t *testing.T) {
Expand All @@ -267,5 +267,5 @@ func Test_MutualTLSConfig(t *testing.T) {
require.NotEmpty(t, tlsConfig.Certificates[0].Certificate)
require.NotNil(t, tlsConfig.Certificates[0].PrivateKey)
require.NotNil(t, tlsConfig.RootCAs)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1)
require.Len(t, tlsConfig.RootCAs.Subjects(), 1) //nolint:staticcheck
}

0 comments on commit 6c0470e

Please sign in to comment.