diff options
author | Joe Tsai <joetsai@digital-static.net> | 2016-05-28 02:14:25 -0700 |
---|---|---|
committer | Joe Tsai <thebrokentoaster@gmail.com> | 2016-05-29 06:52:45 +0000 |
commit | b859a78e0a71d769274dac8cf0108bdf41ec55a5 (patch) | |
tree | 0613cc1baced15fd723387873b402835c36ea63b | |
parent | 4969b46a316888950bd1910d7ef123883ab6c9f3 (diff) | |
download | go-b859a78e0a71d769274dac8cf0108bdf41ec55a5.tar.gz go-b859a78e0a71d769274dac8cf0108bdf41ec55a5.zip |
io: use SeekStart, SeekCurrent, and SeekEnd in io.Seeker documentation
The documentation previously used C style enumerations: 0, 1, 2.
While this is pretty much universally correct, it does not help a user
become aware of the existence of the SeekStart, SeekCurrent, and SeekEnd
constants. Thus, we should use them in the documentation to direct people's
attention to them.
Updates #6885
Change-Id: I44b5e78d41601c68a0a1c96428c853df53981d52
Reviewed-on: https://go-review.googlesource.com/23551
Reviewed-by: Andrew Gerrand <adg@golang.org>
-rw-r--r-- | src/io/io.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/io/io.go b/src/io/io.go index 80398b3997..19d0ae5add 100644 --- a/src/io/io.go +++ b/src/io/io.go @@ -102,10 +102,12 @@ type Closer interface { // Seeker is the interface that wraps the basic Seek method. // // Seek sets the offset for the next Read or Write to offset, -// interpreted according to whence: 0 means relative to the start of -// the file, 1 means relative to the current offset, and 2 means -// relative to the end. Seek returns the new offset relative to the -// start of the file and an error, if any. +// interpreted according to whence: +// SeekStart means relative to the start of the file, +// SeekCurrent means relative to the current offset, and +// SeekEnd means relative to the end. +// Seek returns the new offset relative to the start of the +// file and an error, if any. // // Seeking to an offset before the start of the file is an error. // Seeking to any positive offset is legal, but the behavior of subsequent |