From: HowJMay Date: Fri, 24 Jun 2022 04:02:10 +0000 (+0000) Subject: io: clarify SeekEnd offset value X-Git-Tag: go1.19rc1~63 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3b594b9255;p=gostls13.git io: clarify SeekEnd offset value 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 Reviewed-by: Emmanuel Odeke Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Auto-Submit: Emmanuel Odeke Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/src/io/io.go b/src/io/io.go index db88125f50..9d4c0d2506 100644 --- a/src/io/io.go +++ b/src/io/io.go @@ -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. //