From 69a6635b94caef8738e788c97fb3561c329eb410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 15 Mar 2024 14:29:25 +0000 Subject: [PATCH] don't need to bytes.Clone since []byte(string) copies already --- flow/connectors/kafka/kafka.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flow/connectors/kafka/kafka.go b/flow/connectors/kafka/kafka.go index ed1d09abbc..6db283a11f 100644 --- a/flow/connectors/kafka/kafka.go +++ b/flow/connectors/kafka/kafka.go @@ -1,7 +1,6 @@ package connkafka import ( - "bytes" "context" "crypto/tls" "errors" @@ -197,7 +196,7 @@ func (c *KafkaConnector) SyncRecords(ctx context.Context, req *model.SyncRecords return nil, fmt.Errorf("script returned non-nil non-string: %v", value) } wg.Add(1) - c.client.Produce(wgCtx, &kgo.Record{Topic: topic, Value: bytes.Clone([]byte(lstr))}, produceCb) + c.client.Produce(wgCtx, &kgo.Record{Topic: topic, Value: []byte(lstr)}, produceCb) numRecords += 1 tableNameRowsMapping[topic] += 1