Skip to content

Commit

Permalink
Linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyatt Alt committed Sep 8, 2023
1 parent f0597db commit d0e63c1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go/mcap/indexed_message_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (it *indexedMessageIterator) loadChunk(chunkIndex *ChunkIndex) error {
return nil
}

func (it *indexedMessageIterator) Next(p []byte) (*Schema, *Channel, *Message, error) {
func (it *indexedMessageIterator) Next(_ []byte) (*Schema, *Channel, *Message, error) {
if !it.hasReadSummarySection {
err := it.parseSummarySection()
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions go/mcap/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ func (l *Lexer) Next(p []byte) (TokenType, []byte, error) {
if err != nil {
return TokenError, nil, fmt.Errorf("failed to allocate %d bytes for %s token: %w", recordLen, opcode, err)
}
fmt.Println("new", recordLen)
} else {
fmt.Println("reuse")
}

record := p[:recordLen]
Expand Down
4 changes: 2 additions & 2 deletions go/mcap/lexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ func TestCustomDecompressor(t *testing.T) {
)
lzr := lz4.NewReader(nil)
blockCount := 0
lzr.Apply(lz4.OnBlockDoneOption(func(size int) {
assert.Nil(t, lzr.Apply(lz4.OnBlockDoneOption(func(size int) {
blockCount++
}))
})))
lexer, err := NewLexer(bytes.NewReader(buf), &LexerOptions{
Decompressors: map[CompressionFormat]ResettableReader{
CompressionLZ4: lzr,
Expand Down
2 changes: 1 addition & 1 deletion go/mcap/resettable_write_closer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ func (b bufCloser) Write(p []byte) (int, error) {
return b.b.Write(p)
}

func (b bufCloser) Reset(w io.Writer) {
func (b bufCloser) Reset(_ io.Writer) {
b.b.Reset()
}
4 changes: 2 additions & 2 deletions go/mcap/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,9 @@ func TestBYOCompressor(t *testing.T) {
// example - custom lz4 settings
lzw := lz4.NewWriter(nil)
blockCount := 0
lzw.Apply(lz4.OnBlockDoneOption(func(size int) {
assert.Nil(t, lzw.Apply(lz4.OnBlockDoneOption(func(size int) {
blockCount++
}))
})))

writer, err := NewWriter(buf, &WriterOptions{
Chunked: true,
Expand Down

0 comments on commit d0e63c1

Please sign in to comment.