On Fri, Jul 12, 2024 at 6:12 AM William Tang <galaxyking0...@gmail.com> wrote:
>
> I’m reading the current implementation of io.Copy for TCPConn. It has a 
> struct called tcpConnWithoutWriteTo 3, which will cause the WriterTo casting 
> from a io.Reader to fail 1. How and why does it work internally?

When there are two promoted methods with the same name, both methods
are ignored.  The language spec lists the rules at
https://go.dev/ref/spec#Selectors.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcX6p4-3USq6wQkHMtHofMcrgROpMPa4dqS6cYO%2Bsr0gMg%40mail.gmail.com.

Reply via email to