Comment on Struct composition with GoparentComments−gohrt11yWhat is the benefit of re-using the 'client' identifier? There's no closure capturing the identifier.Compare: client, server := net.Pipe() var buf bytes.Buffer client = &recordingConn { Conn: client, Writer: io.MultiWriter(client, &buf), } vs tempClient, server := net.Pipe() var buf bytes.Buffer client = &recordingConn { Conn: tempClient, Writer: io.MultiWriter(tempClient, &buf), } The latter is less confusing to me.
Comments
What is the benefit of re-using the 'client' identifier? There's no closure capturing the identifier.
Compare:
vs The latter is less confusing to me.