From c59125b64c809a13ce04d3524053d0ab6a7d5404 Mon Sep 17 00:00:00 2001
From: Juan Batiz-Benet <juan@benet.ai>
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 | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)
 rename {swarm => net/conn}/conn.go (96%)
 rename {swarm => net/conn}/conn_test.go (99%)

diff --git a/swarm/conn.go b/net/conn/conn.go
similarity index 96%
rename from swarm/conn.go
rename to net/conn/conn.go
index 468e86cd2..a6e1db36b 100644
--- a/swarm/conn.go
+++ b/net/conn/conn.go
@@ -29,8 +29,8 @@ type Conn struct {
 	secOut   chan<- []byte
 }
 
-// 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 952434acf..c180f3238 100644
--- a/swarm/conn_test.go
+++ b/net/conn/conn_test.go
@@ -2,11 +2,13 @@ package swarm
 
 import (
 	"fmt"
-	ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
-	mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
-	peer "github.com/jbenet/go-ipfs/peer"
 	"net"
 	"testing"
+
+	peer "github.com/jbenet/go-ipfs/peer"
+
+	ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
+	mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
 )
 
 func setupPeer(id string, addr string) (*peer.Peer, error) {
-- 
GitLab