On Tue, Jul 21, 2015 at 8:40 AM Runix <
rsu...@gmail.com> wrote:
>
> Hi, why the documentation says that (
http://golang.org/pkg/io/#Seeker):
>
> Seeking to a negative offset is an error. Seeking to any positive offset is legal, but the behavior of subsequent I/O operations on the underlying object is implementation-dependent.
>
I agree, that statement is ambiguous in context. The name of the first
parameter is "offset". The return value is also an offset, always
relative to the origin of the file, and it is an error to attempt to
seek to a position that would result in a negative value for this
returned offset. This could be expressed more clearly in the
commentary.