3 ms·
> (I somewhat agree about the io.Reader case where returning both the number of "screwed up" bytes and an error can be useful, though perhaps the number of byte
by masklinn 4y ago
> (I somewhat agree about the io.Reader case where returning both the number of "screwed up" bytes and an error can be useful, though perhaps the number of bytes should be encoded in the error type instead. I rarely care about them.)
Or you can just keep it as-is because it's one of the very few cases where it does make sense to have a product type.