From b37577acd8ae278a7da61598ad504880c71459c2 Mon Sep 17 00:00:00 2001 From: Tim Mwangi Date: Mon, 23 Aug 2021 17:31:45 -0700 Subject: [PATCH] fix golint issue by passing empty map --- config/configgrpc/configgrpc.go | 4 +--- config/configgrpc/configgrpc_test.go | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index 574a9def2ce..ef71e61bc96 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -388,7 +388,5 @@ func GetGRPCCompressionKey(compressionType string) string { } func RegisterClientDialOptionHandlers(handlers ...ClientDialOptionHandler) { - for _, handler := range handlers { - clientOptionHandlerList = append(clientOptionHandlerList, handler) - } + clientOptionHandlerList = append(clientOptionHandlerList, handlers...) } diff --git a/config/configgrpc/configgrpc_test.go b/config/configgrpc/configgrpc_test.go index 92c06538568..3a599fb3744 100644 --- a/config/configgrpc/configgrpc_test.go +++ b/config/configgrpc/configgrpc_test.go @@ -553,7 +553,8 @@ func TestRegisterClientDialOptionHandler(t *testing.T) { }) }) gcs := &GRPCClientSettings{} - opts, err := gcs.ToDialOptions() + opts, err := gcs.ToDialOptions(map[config.ComponentID]component.Extension{}) assert.NoError(t, err) - assert.Len(t, opts, 2) + // Also count opentelemetry's observability plugin interceptors + assert.Len(t, opts, 4) }