aboutsummaryrefslogtreecommitdiffstats
path: root/formats/packfile/scanner.go
diff options
context:
space:
mode:
Diffstat (limited to 'formats/packfile/scanner.go')
-rw-r--r--formats/packfile/scanner.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/formats/packfile/scanner.go b/formats/packfile/scanner.go
index 86092a1..a5e4215 100644
--- a/formats/packfile/scanner.go
+++ b/formats/packfile/scanner.go
@@ -49,6 +49,10 @@ type Scanner struct {
// is waiting to be read
pendingObject *ObjectHeader
version, objects uint32
+
+ // lsSeekable says if this scanner can do Seek or not, to have a Scanner
+ // seekable a r implementing io.Seeker is required
+ IsSeekable bool
}
// NewScanner returns a new Scanner based on a reader, if the given reader
@@ -65,7 +69,8 @@ func NewScanner(r io.Reader) *Scanner {
newByteReadSeeker(seeker),
crc,
},
- crc: crc,
+ crc: crc,
+ IsSeekable: ok,
}
}