]> Cypherpunks repositories - gostls13.git/commitdiff
io: clarify SeekEnd offset value
authorHowJMay <yuanyanghau@gmail.com>
Fri, 24 Jun 2022 04:02:10 +0000 (04:02 +0000)
committerGopher Robot <gobot@golang.org>
Sat, 25 Jun 2022 19:08:51 +0000 (19:08 +0000)
fixes #53474

Change-Id: I14c3dc800dc27233630a54592328bb0df1bbaa5d
GitHub-Last-Rev: 46f93cfbd41c1b3274b570744f18d08e7759eb1e
GitHub-Pull-Request: golang/go#53505
Reviewed-on: https://go-review.googlesource.com/c/go/+/413614
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/io/io.go

index db88125f507799dafbb619e638ec846480784bf4..9d4c0d2506fba27431e76c4e00c9965655a4a63d 100644 (file)
@@ -111,7 +111,8 @@ type Closer interface {
 // 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.
+// SeekEnd means relative to the end
+// (for example, offset = -2 specifies the penultimate byte of the file).
 // Seek returns the new offset relative to the start of the
 // file or an error, if any.
 //