From cd6b4e48674f057030fa508e4ecd8ec9bfe299b0 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Thu, 11 Sep 2014 00:58:35 -0700 Subject: [PATCH] moved conn to own pkg --- {swarm => net/conn}/conn.go | 4 ++-- {swarm => net/conn}/conn_test.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) rename {swarm => net/conn}/conn.go (95%) rename {swarm => net/conn}/conn_test.go (99%) diff --git a/swarm/conn.go b/net/conn/conn.go similarity index 95% rename from swarm/conn.go rename to net/conn/conn.go index 072b53437..8e1e47224 100644 --- a/swarm/conn.go +++ b/net/conn/conn.go @@ -24,8 +24,8 @@ type Conn struct { Incoming *msgio.Chan } -// ConnMap maps Keys (Peer.IDs) to Connections. -type ConnMap map[u.Key]*Conn +// Map maps Keys (Peer.IDs) to Connections. +type Map map[u.Key]*Conn // Dial connects to a particular peer, over a given network // Example: Dial("udp", peer) diff --git a/swarm/conn_test.go b/net/conn/conn_test.go similarity index 99% rename from swarm/conn_test.go rename to net/conn/conn_test.go index 171d9c38b..bfffe84b0 100644 --- a/swarm/conn_test.go +++ b/net/conn/conn_test.go @@ -2,11 +2,12 @@ package swarm import ( "fmt" + "net" + "testing" + peer "github.com/jbenet/go-ipfs/peer" ma "github.com/jbenet/go-multiaddr" mh "github.com/jbenet/go-multihash" - "net" - "testing" ) func setupPeer(id string, addr string) (*peer.Peer, error) {