On Wed, Jun 15, 2016 at 5:43 PM, <jonathan.gaill...@gmail.com> 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.