Commit 495154fc authored by Jeromy's avatar Jeromy

switch to using stdlib context package

parent adef95b8
......@@ -3,10 +3,10 @@ package addrutil
import (
"fmt"
"context"
logging "github.com/ipfs/go-log"
ma "github.com/jbenet/go-multiaddr"
manet "github.com/jbenet/go-multiaddr-net"
context "golang.org/x/net/context"
_ "github.com/whyrusleeping/ws-transport"
)
......
......@@ -10,11 +10,11 @@ import (
testutil "github.com/libp2p/go-libp2p/testutil"
ci "github.com/libp2p/go-libp2p/testutil/ci"
"context"
peer "github.com/ipfs/go-libp2p-peer"
pstore "github.com/ipfs/go-libp2p-peerstore"
ma "github.com/jbenet/go-multiaddr"
manet "github.com/jbenet/go-multiaddr-net"
context "golang.org/x/net/context"
)
func closeSwarms(swarms []*Swarm) {
......
......@@ -3,10 +3,10 @@ package swarm
import (
"testing"
"context"
peer "github.com/ipfs/go-libp2p-peer"
pstore "github.com/ipfs/go-libp2p-peerstore"
ma "github.com/jbenet/go-multiaddr"
context "golang.org/x/net/context"
)
func TestPeers(t *testing.T) {
......
......@@ -8,10 +8,10 @@ import (
ci "github.com/libp2p/go-libp2p/testutil/ci"
"context"
peer "github.com/ipfs/go-libp2p-peer"
pstore "github.com/ipfs/go-libp2p-peerstore"
ma "github.com/jbenet/go-multiaddr"
context "golang.org/x/net/context"
)
func TestSimultOpen(t *testing.T) {
......
......@@ -7,9 +7,9 @@ import (
addrutil "github.com/libp2p/go-libp2p/p2p/net/swarm/addr"
testutil "github.com/libp2p/go-libp2p/testutil"
"context"
pstore "github.com/ipfs/go-libp2p-peerstore"
ma "github.com/jbenet/go-multiaddr"
context "golang.org/x/net/context"
)
func TestFilterAddrs(t *testing.T) {
......
......@@ -6,11 +6,11 @@ import (
inet "github.com/libp2p/go-libp2p/p2p/net"
conn "github.com/libp2p/go-libp2p/p2p/net/conn"
"context"
ic "github.com/ipfs/go-libp2p-crypto"
peer "github.com/ipfs/go-libp2p-peer"
ma "github.com/jbenet/go-multiaddr"
ps "github.com/jbenet/go-peerstream"
context "golang.org/x/net/context"
)
// Conn is a simple wrapper around a ps.Conn that also exposes
......
......@@ -3,6 +3,7 @@ package swarm
import (
"fmt"
"context"
lgbl "github.com/ipfs/go-libp2p-loggables"
ma "github.com/jbenet/go-multiaddr"
ps "github.com/jbenet/go-peerstream"
......@@ -10,7 +11,6 @@ import (
mconn "github.com/libp2p/go-libp2p/p2p/metrics/conn"
inet "github.com/libp2p/go-libp2p/p2p/net"
conn "github.com/libp2p/go-libp2p/p2p/net/conn"
context "golang.org/x/net/context"
)
func (s *Swarm) AddListenAddr(a ma.Multiaddr) error {
......
......@@ -8,9 +8,9 @@ import (
metrics "github.com/libp2p/go-libp2p/p2p/metrics"
inet "github.com/libp2p/go-libp2p/p2p/net"
"context"
ma "github.com/jbenet/go-multiaddr"
"github.com/jbenet/goprocess"
context "golang.org/x/net/context"
)
// Network implements the inet.Network interface.
......
......@@ -7,7 +7,7 @@ import (
inet "github.com/libp2p/go-libp2p/p2p/net"
testutil "github.com/libp2p/go-libp2p/p2p/test/util"
context "golang.org/x/net/context"
"context"
)
// TestConnectednessCorrect starts a few networks, connects a few
......
......@@ -4,10 +4,10 @@ import (
"testing"
"time"
"context"
peer "github.com/ipfs/go-libp2p-peer"
ma "github.com/jbenet/go-multiaddr"
inet "github.com/libp2p/go-libp2p/p2p/net"
context "golang.org/x/net/context"
)
func streamsSame(a, b inet.Stream) bool {
......
......@@ -13,10 +13,10 @@ import (
inet "github.com/libp2p/go-libp2p/p2p/net"
testutil "github.com/libp2p/go-libp2p/testutil"
"context"
peer "github.com/ipfs/go-libp2p-peer"
pstore "github.com/ipfs/go-libp2p-peerstore"
ma "github.com/jbenet/go-multiaddr"
context "golang.org/x/net/context"
)
func EchoStreamHandler(stream inet.Stream) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment