Skip to content

Commit

Permalink
fix golint issue by passing empty map
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-mwangi committed Aug 24, 2021
1 parent 9f06773 commit b37577a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}
5 changes: 3 additions & 2 deletions config/configgrpc/configgrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit b37577a

Please sign in to comment.