From 306fcb31fbdb76dbc690931e195fa5dd9fbbbef3 Mon Sep 17 00:00:00 2001 From: Nathanael Tehilla Gunawan <61931072+narasaka@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:52:02 -0800 Subject: [PATCH] Revert moving headers to separate variable --- go/cli/mcap/cmd/metadata.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/go/cli/mcap/cmd/metadata.go b/go/cli/mcap/cmd/metadata.go index 369c14f134..eab35b7771 100644 --- a/go/cli/mcap/cmd/metadata.go +++ b/go/cli/mcap/cmd/metadata.go @@ -25,13 +25,12 @@ var ( func printMetadata(w io.Writer, r io.ReadSeeker, info *mcap.Info) error { rows := make([][]string, 0, len(info.MetadataIndexes)) - headers := []string{ + rows = append(rows, []string{ "name", "offset", "length", "metadata", - } - rows = append(rows, headers) + }) for _, idx := range info.MetadataIndexes { offset := idx.Offset + 1 + 8 if offset > math.MaxInt64 { @@ -59,7 +58,7 @@ func printMetadata(w io.Writer, r io.ReadSeeker, info *mcap.Info) error { idx.Name, fmt.Sprintf("%d", idx.Offset), fmt.Sprintf("%d", idx.Length), - string(jsonSerialized), + string(jsonSerialized), }) } utils.FormatTable(w, rows)