From ab184e6fa8c4469c67d3a3ca67fa4d381c65af2f Mon Sep 17 00:00:00 2001 From: Damien Neil Date: Tue, 6 Jun 2023 14:01:59 -0700 Subject: [PATCH] quic: rename side type to connSide The clearest name for vars of this type is often "side", so make the type name distinct to avoid conflicts. For golang/go#58547 Change-Id: I35fda7ae70e54cd063bae7a83bcb2c8f5f76244f Reviewed-on: https://go-review.googlesource.com/c/net/+/501375 Reviewed-by: Jonathan Amsterdam Run-TryBot: Damien Neil TryBot-Result: Gopher Robot --- internal/quic/quic.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/quic/quic.go b/internal/quic/quic.go index 2e3699658e..f49148d8ae 100644 --- a/internal/quic/quic.go +++ b/internal/quic/quic.go @@ -39,15 +39,15 @@ const ( // https://www.rfc-editor.org/rfc/rfc9002.html#section-6.1.2-6 const timerGranularity = 1 * time.Millisecond -// A side distinguishes between the client and server sides of a connection. -type side int8 +// A connSide distinguishes between the client and server sides of a connection. +type connSide int8 const ( - clientSide = side(iota) + clientSide = connSide(iota) serverSide ) -func (s side) String() string { +func (s connSide) String() string { switch s { case clientSide: return "client" @@ -118,7 +118,7 @@ const ( dirStreamBitMask = 0x2 ) -func newStreamID(initiator side, typ streamType, num int64) streamID { +func newStreamID(initiator connSide, typ streamType, num int64) streamID { id := streamID(num << 2) if typ == uniStream { id |= uniStreamBit @@ -129,7 +129,7 @@ func newStreamID(initiator side, typ streamType, num int64) streamID { return id } -func (s streamID) initiator() side { +func (s streamID) initiator() connSide { if s&initiatorStreamBitMask == serverInitiatedStreamBit { return serverSide }