From 3b594b9255b091b8c3b56fc9592f05ebe71e31b8 Mon Sep 17 00:00:00 2001 From: HowJMay Date: Fri, 24 Jun 2022 04:02:10 +0000 Subject: [PATCH] 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 --- src/io/io.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. // -- 2.48.1