From edb6e7746da72d82e01f85fd33f96e415d4a28a6 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 bce6e18ddbb..a1e6d1ae57f 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())