FAQ
It seems that it is not well defined what happens when you get an error.
Looking at the os.File implementation the returned n value is always zero
on error. But isn't it possible that the underlying call can error but
still have seeked some?

The reader and writer docs are clear :)

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Ian Lance Taylor at Jun 16, 2016 at 3:51 am

    On Wed, Jun 15, 2016 at 5:43 PM, wrote:
    It seems that it is not well defined what happens when you get an error.
    Looking at the os.File implementation the returned n value is always zero on
    error. But isn't it possible that the underlying call can error but still
    have seeked some?
    Since Seeker explicitly permits any positive offset, I think that any
    error can only be from an negative offset, or from an impossible
    offset (e.g., too large to represent), or from a Seeker that somehow
    fails to support the Seek operation. I don't see any other way Seek
    is permitted to fail. And in those cases presumably the current
    position has not changed. I think it would be fine to document this
    more clearly if you want to send a patch.

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 16, '16 at 12:43a
activeJun 16, '16 at 3:51a
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase