aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/scanner.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-04-26 13:30:03 +0200
committerSantiago M. Mola <santi@mola.io>2017-04-26 14:52:42 +0200
commit250ba298a9ec93ab3c62a8aa60834cc1889f65ac (patch)
tree7196dd8c91142f75b8569a2dbf72f1de0f5f2b67 /plumbing/format/packfile/scanner.go
parent45ac03181f61477d28e031725c68f938cb379554 (diff)
downloadgo-git-250ba298a9ec93ab3c62a8aa60834cc1889f65ac.tar.gz
format/packfile: rename Seek to SeekFromStart
This has signature and behavior distinct from io.Seeker, go vet complains about this, so we change it to a different name to avoid confusion.
Diffstat (limited to 'plumbing/format/packfile/scanner.go')
-rw-r--r--plumbing/format/packfile/scanner.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/format/packfile/scanner.go b/plumbing/format/packfile/scanner.go
index d8cece6..97512d1 100644
--- a/plumbing/format/packfile/scanner.go
+++ b/plumbing/format/packfile/scanner.go
@@ -300,8 +300,9 @@ func (s *Scanner) copyObject(w io.Writer) (int64, error) {
return io.Copy(w, s.zr)
}
-// Seek sets a new offset from start, returns the old position before the change
-func (s *Scanner) Seek(offset int64) (previous int64, err error) {
+// SeekFromStart sets a new offset from start, returns the old position before
+// the change.
+func (s *Scanner) SeekFromStart(offset int64) (previous int64, err error) {
// if seeking we assume that you are not interested on the header
if s.version == 0 {
s.version = VersionSupported