Skip to content

Commit

Permalink
warning on readerat
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Mar 3, 2022
1 parent 5a41f7f commit e0f4c23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions traversal/selector/matcher_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ type readerat struct {
io.ReadSeeker
}

// ReadAt provides the io.ReadAt method over a ReadSeeker.
// This implementation does not support concurrent calls to `ReadAt`,
// as specified by the ReaderAt interface, and so must only be used
// in non-concurrent use cases.
func (r readerat) ReadAt(p []byte, off int64) (n int, err error) {
// TODO: consider keeping track of current offset.
_, err = r.Seek(off, 0)
Expand Down

0 comments on commit e0f4c23

Please sign in to comment.