From e45c3b6f8584331370e443463ba886a975e70d6a Mon Sep 17 00:00:00 2001 From: Maxime Picque Date: Fri, 12 Jan 2024 13:49:21 +0100 Subject: [PATCH] fix empty elements in consumer groups array --- consumer_groups.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consumer_groups.go b/consumer_groups.go index ac94f66..f10990f 100644 --- a/consumer_groups.go +++ b/consumer_groups.go @@ -49,7 +49,7 @@ func consumerGroups(config cluster.Config, bootstrapServers []string, sorted *bo // extract all keys of the map, sort the keys if sorted flag is set func keys(groups map[string]string, sorted *bool) []string { - keys := make([]string, len(groups)) + var keys []string for consumerGroup, _ := range groups { keys = append(keys, consumerGroup) }