From: Joe Tsai Date: Sat, 28 May 2016 09:14:25 +0000 (-0700) Subject: io: use SeekStart, SeekCurrent, and SeekEnd in io.Seeker documentation X-Git-Tag: go1.7beta1~43 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b859a78e0a71d769274dac8cf0108bdf41ec55a5;p=gostls13.git 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 --- 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