From 6e1a252f1eb0d90afa3b5863b51a6913ccc1057e Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:56:50 -0600 Subject: [PATCH] [release-18.0] VDiff CLI: Fix VDiff `show` bug (#16177) (#16197) --- 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 86f76f42545..a4566fb1f8d 100644 --- a/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go +++ b/go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go @@ -455,7 +455,6 @@ func getStructFieldNames(s any) []string { } func buildListings(listings []*listing) string { - var values []string var lines [][]string var result string @@ -467,6 +466,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())