Skip to content

Commit

Permalink
Rename attachment reader variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyatt Alt committed Nov 2, 2023
1 parent 0289aba commit 49b4e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/cli/mcap/cmd/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func sortFile(w io.Writer, r io.ReadSeeker) error {
// handle the attachments and metadata metadata first; physical location in
// the file is irrelevant but order is preserved.
for _, index := range info.AttachmentIndexes {
ar, err := reader.GetAttachmentReader(index.Offset)
attReader, err := reader.GetAttachmentReader(index.Offset)
if err != nil {
return fmt.Errorf("failed to read attachment: %w", err)
}
Expand All @@ -103,7 +103,7 @@ func sortFile(w io.Writer, r io.ReadSeeker) error {
CreateTime: index.CreateTime,
LogTime: index.LogTime,
DataSize: index.DataSize,
Data: ar.Data(),
Data: attReader.Data(),
})
if err != nil {
return fmt.Errorf("failed to write attachment: %w", err)
Expand Down

0 comments on commit 49b4e2b

Please sign in to comment.