We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33ee88b commit 03b7219Copy full SHA for 03b7219
pkg/cmd/kafka/consumergroup/resetoffset/reset_offset.go
@@ -238,16 +238,16 @@ func runCmd(opts *Options) error {
238
}
239
240
func mapResetOffsetResultToTableFormat(consumers []kafkainstanceclient.ConsumerGroupResetOffsetResultItem) []updatedConsumerRow {
241
- rows := []updatedConsumerRow{}
+ rows := make([]updatedConsumerRow, len(consumers))
242
243
- for _, t := range consumers {
+ for i, t := range consumers {
244
245
row := updatedConsumerRow{
246
Topic: t.GetTopic(),
247
Partition: t.GetPartition(),
248
Offset: t.GetOffset(),
249
250
- rows = append(rows, row)
+ rows[i] = row
251
252
253
return rows
0 commit comments