diff --git a/pkg/config/tlscfg/options.go b/pkg/config/tlscfg/options.go index c67dcb2b2ef..794c7cbe254 100644 --- a/pkg/config/tlscfg/options.go +++ b/pkg/config/tlscfg/options.go @@ -8,7 +8,6 @@ import ( "crypto/x509" "errors" "fmt" - "io" "os" "path/filepath" "time" @@ -185,10 +184,10 @@ func addCertToPool(caPath string, certPool *x509.CertPool) error { return nil } -var _ io.Closer = (*Options)(nil) +// var _ io.Closer = (*Options)(nil) // Close shuts down the embedded certificate watcher. -func (o *Options) Close() error { +func (o *Options) close() error { if o.certWatcher != nil { return o.certWatcher.Close() } diff --git a/pkg/config/tlscfg/options_test.go b/pkg/config/tlscfg/options_test.go index 4a1d5d46555..72467f27fb8 100644 --- a/pkg/config/tlscfg/options_test.go +++ b/pkg/config/tlscfg/options_test.go @@ -172,7 +172,7 @@ func TestOptionsToConfig(t *testing.T) { assert.Equal(t, &c, cert) } } - require.NoError(t, test.options.Close()) + require.NoError(t, test.options.close()) }) } }