Skip to content

Commit acefcb7

Browse files
ericlagergrenbradfitz
authored andcommitted
io: define SeekStart, SeekCurrent, SeekEnd constants for use with Seeker
Fixes #6885 Change-Id: I6907958186f6a2427da1ad2f6c20bd5d7bf7a3f9 Reviewed-on: https://go-review.googlesource.com/19862 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 1747788 commit acefcb7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/io/io.go

+7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ import (
1616
"errors"
1717
)
1818

19+
// Seek whence values.
20+
const (
21+
SeekStart = 0 // seek relative to the origin of the file
22+
SeekCurrent = 1 // seek relative to the current offset
23+
SeekEnd = 2 // seek relative to the end
24+
)
25+
1926
// ErrShortWrite means that a write accepted fewer bytes than requested
2027
// but failed to return an explicit error.
2128
var ErrShortWrite = errors.New("short write")

0 commit comments

Comments
 (0)