From 646974e190b77d243c4316c4168b6dbc959cff3d Mon Sep 17 00:00:00 2001 From: Rohit Nayak Date: Fri, 16 Feb 2024 14:32:09 +0100 Subject: [PATCH] Address review comment Signed-off-by: Rohit Nayak --- go/vt/vttablet/tabletserver/vstreamer/helper_event_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/go/vt/vttablet/tabletserver/vstreamer/helper_event_test.go b/go/vt/vttablet/tabletserver/vstreamer/helper_event_test.go index 7d65ea58116..5061295758e 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/helper_event_test.go +++ b/go/vt/vttablet/tabletserver/vstreamer/helper_event_test.go @@ -37,6 +37,7 @@ package vstreamer import ( "context" "fmt" + "slices" "strconv" "strings" "testing" @@ -424,10 +425,8 @@ func getMetadataKey(table, col string) string { func (ts *TestSpec) setMetadataMap(table, col, value string) { values := strings.Split(value, ",") - valuesReversed := make([]string, len(values)) - for i, v := range values { - valuesReversed[len(values)-1-i] = v - } + valuesReversed := slices.Clone(values) + slices.Reverse(valuesReversed) ts.metadata[getMetadataKey(table, col)] = valuesReversed }