From 0ad14a89f5f9da577dae6a63ad196015e51a0381 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 13 Mar 2023 17:55:05 +0100 Subject: global: buff -> buf This always struck me as kind of weird and non-standard. Signed-off-by: Jason A. Donenfeld --- conn/bindtest/bindtest.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'conn/bindtest') diff --git a/conn/bindtest/bindtest.go b/conn/bindtest/bindtest.go index b33c53d..74e7add 100644 --- a/conn/bindtest/bindtest.go +++ b/conn/bindtest/bindtest.go @@ -94,12 +94,12 @@ func (c *ChannelBind) BatchSize() int { return 1 } func (c *ChannelBind) SetMark(mark uint32) error { return nil } func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc { - return func(buffs [][]byte, sizes []int, eps []conn.Endpoint) (n int, err error) { + return func(bufs [][]byte, sizes []int, eps []conn.Endpoint) (n int, err error) { select { case <-c.closeSignal: return 0, net.ErrClosed case rx := <-ch: - copied := copy(buffs[0], rx) + copied := copy(bufs[0], rx) sizes[0] = copied eps[0] = c.target6 return 1, nil @@ -107,8 +107,8 @@ func (c *ChannelBind) makeReceiveFunc(ch chan []byte) conn.ReceiveFunc { } } -func (c *ChannelBind) Send(buffs [][]byte, ep conn.Endpoint) error { - for _, b := range buffs { +func (c *ChannelBind) Send(bufs [][]byte, ep conn.Endpoint) error { + for _, b := range bufs { select { case <-c.closeSignal: return net.ErrClosed -- cgit v1.2.3