New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io: Seeker: clarify expected sign of offset for SeekEnd #53474
Labels
Documentation
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
ianlancetaylor
added
Documentation
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
labels
Jun 21, 2022
I don't see any ambiguity, but I'm OK with adding a sentence or adjusting the existing one. The docs for the C function |
ianlancetaylor
changed the title
io.Seeker: Clarify expected sign of offset for SeekEnd
io: Seeker: clarify expected sign of offset for SeekEnd
Jun 21, 2022
howjmay
added a commit
to howjmay/go
that referenced
this issue
Jun 22, 2022
Make the description of SeekEnd more clear. close golang#53474
Change https://go.dev/cl/413614 mentions this issue: |
howjmay
added a commit
to howjmay/go
that referenced
this issue
Jun 24, 2022
jproberts
pushed a commit
to jproberts/go
that referenced
this issue
Aug 10, 2022
fixes golang#53474 Change-Id: I14c3dc800dc27233630a54592328bb0df1bbaa5d GitHub-Last-Rev: 46f93cf GitHub-Pull-Request: golang#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>
The C documentation mentioned by Ian is perfect. The "plus" makes it clear.
…On Wed, Jun 22, 2022 at 11:49 AM GopherBot ***@***.***> wrote:
Change https://go.dev/cl/413614 mentions this issue: src/io: amend
SeekerEnd description
—
Reply to this email directly, view it on GitHub
<#53474 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUO5YCFUVRFEQKSBECCZDVQNN3HANCNFSM5ZK4QGCA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Documentation
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
I suggest updating the documentation to clarify that a negative offset is expected to seek to a valid position within the file when SeekEnd is passed as whence to an io.Seeker. Current documentation:
I find "SeekEnd means relative to the end" ambiguous about the expected sign.
"SeekEnd means relative to the end (e.g., offset = -2 specifies the penultimate byte of the file)" would be clearer but is verbose.
The text was updated successfully, but these errors were encountered: