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:
Eric Lagergren 2016-02-23 18:40:42 -08:00 committed by Brad Fitzpatrick
parent 1747788c56
commit acefcb732c

View file

@ -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")