From 79396af543d4cd5bcf57b5ddecf6df02cc0f4348 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Sat, 15 Jun 2024 05:47:36 +0200 Subject: [PATCH] VDiff CLI: Fix VDiff `show` bug (#16177) Signed-off-by: Rohit Nayak --- go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go index 8af72cedfdb..dfca3386491 100644 --- a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go +++ b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go @@ -462,7 +462,6 @@ func getStructFieldNames(s any) []string { } func buildListings(listings []*listing) string { - var values []string var lines [][]string var result string @@ -474,6 +473,7 @@ func buildListings(listings []*listing) string { // The header is the first row. lines = append(lines, fields) for _, listing := range listings { + var values []string v := reflect.ValueOf(*listing) for _, field := range fields { values = append(values, v.FieldByName(field).String())