Skip to content

Commit

Permalink
Revert moving headers to separate variable
Browse files Browse the repository at this point in the history
  • Loading branch information
narasaka committed Nov 16, 2023
1 parent d246746 commit 306fcb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions go/cli/mcap/cmd/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 306fcb3

Please sign in to comment.