@cryptotaxi247 / kubo / commits / f87094827

fix: multiconn s/Conns()/getConns()

@jbenet must be getConns to avoid clash with private var License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Dec 5, 2014 at 20:54 UTC f870948274cc4c1e0b4dc7c650955df857567d17
2 files changed +3 -3
net/conn/multiconn.go
+1 -1
@@ -262,7 +262,7 @@ func (c *MultiConn) ID() string {
262 return string(ids)
263 }
264
265 -func (c *MultiConn) Conns() []Conn {
265 +func (c *MultiConn) getConns() []Conn {
266 c.RLock()
267 defer c.RUnlock()
268 var conns []Conn
net/conn/multiconn_test.go
+2 -2
@@ -307,11 +307,11 @@ func TestMulticonnClose(t *testing.T) {
307 ctx := context.Background()
308 c1, c2 := setupMultiConns(t, ctx)
309
310 - for _, c := range c1.Conns() {
310 + for _, c := range c1.getConns() {
311 c.Close()
312 }
313
314 - for _, c := range c2.Conns() {
314 + for _, c := range c2.getConns() {
315 c.Close()
316 }
317