mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
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 <bradfitz@golang.org>
This commit is contained in:
parent
1747788c56
commit
acefcb732c
|
@ -16,6 +16,13 @@ import (
|
|||
"errors"
|
||||
)
|
||||
|
||||
// Seek whence values.
|
||||
const (
|
||||
SeekStart = 0 // seek relative to the origin of the file
|
||||
SeekCurrent = 1 // seek relative to the current offset
|
||||
SeekEnd = 2 // seek relative to the end
|
||||
)
|
||||
|
||||
// ErrShortWrite means that a write accepted fewer bytes than requested
|
||||
// but failed to return an explicit error.
|
||||
var ErrShortWrite = errors.New("short write")
|
||||
|
|
Loading…
Reference in a new issue