On Sun, Apr 14, 2024 at 8:05 PM Stephen <[email protected]> wrote: > > https://github.com/golang/go/blob/c0a0ba254c48fc855f9501b0bd3b78e6847ca923/src/io/io_test.go#L167 > > I was walking through this code, and it didn't seem to hit [WriteTo] > (https://github.com/golang/go/blob/c0a0ba254c48fc855f9501b0bd3b78e6847ca923/src/io/io.go#L410-L412) > because of LimitReader > > Is this intended behavior?
The purpose of the test is to make sure that CopyN does the correct thing even if the source type implements WriteTo. So, yes, this is intended behavior. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXL%3DctU1qa%3DjdVpFudSEfGcH3aTt-c860mjoiyeEOBWnA%40mail.gmail.com.
