[go-nuts] Is SizedReaderAt coming back in 1.8?

2016-09-08 Thread 'Ingo Oeser' via golang-nuts
The missing inclusion stems from a misunderstanding of the intended api. The Size method should return the upper bound for the offset passed to ReadAt known ahead of time. If the upper bound cannot be detected, the SizedReaderAt will simply fail creation. When the Size changes, ReadAt will r

Re: [go-nuts] Is SizedReaderAt coming back in 1.8?

2016-09-08 Thread 'Axel Wagner' via golang-nuts
On Fri, Sep 9, 2016 at 6:40 AM, Carl Mastrangelo wrote: > A use case that I am interested in is turning a ReaderAt into a Reader, > which is currently non-trivial to convert. > Out of curiosity, what's wrong with this ? There might be some subtlety that I'm

Re: [go-nuts] Is SizedReaderAt coming back in 1.8?

2016-09-08 Thread Dan Kortschak
The problem is that some Size methods return (int64, error) and others return int64, so the interface was removed, since it can't match all the types in the stdlib that it might be useful for. You can easily define it yourself for your own use though, and provide a shim for the types that don't qu

[go-nuts] Is SizedReaderAt coming back in 1.8?

2016-09-08 Thread Carl Mastrangelo
It seems that io.SizedReaderAt was added temporarily during the 1.7 cycle, but promptly removed. I see an standing github issue for it (15822) but it doesn't seem to have much activity. I would like to express my hope that it comes back (and hopefully others will to). A use case that I am i