diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-03-13 17:55:05 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2023-03-13 17:55:53 +0100 |
commit | 0ad14a89f5f9da577dae6a63ad196015e51a0381 (patch) | |
tree | da74ec4dd4dd79b3577236bc30b42ea999e8516b /conn/bindtest/bindtest.go | |
parent | 7d327ed35aef08e2f54c12645a3002c94c6aec91 (diff) |
global: buff -> buf
This always struck me as kind of weird and non-standard.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'conn/bindtest/bindtest.go')
-rw-r--r-- | conn/bindtest/bindtest.go | 8 |
1 files changed, 4 insertions, 4 deletions
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 |