1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 09:34:03 +08:00

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>
This commit is contained in:
Brian Tiger Chow
2014-12-05 20:54:31 -08:00
parent 697453dfc2
commit f870948274
2 changed files with 3 additions and 3 deletions

View File

@ -262,7 +262,7 @@ func (c *MultiConn) ID() string {
return string(ids)
}
func (c *MultiConn) Conns() []Conn {
func (c *MultiConn) getConns() []Conn {
c.RLock()
defer c.RUnlock()
var conns []Conn

View File

@ -307,11 +307,11 @@ func TestMulticonnClose(t *testing.T) {
ctx := context.Background()
c1, c2 := setupMultiConns(t, ctx)
for _, c := range c1.Conns() {
for _, c := range c1.getConns() {
c.Close()
}
for _, c := range c2.Conns() {
for _, c := range c2.getConns() {
c.Close()
}