mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-16 11:50:08 +08:00
use context from stdlib
This commit is contained in:
parent
8b37b2c3bd
commit
c87d50ff49
@ -1,6 +1,7 @@
|
||||
package peerstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
@ -8,7 +9,6 @@ import (
|
||||
peer "github.com/ipfs/go-libp2p-peer"
|
||||
addr "github.com/ipfs/go-libp2p-peerstore/addr"
|
||||
ma "github.com/jbenet/go-multiaddr"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -25,12 +25,6 @@
|
||||
"name": "go-multiaddr",
|
||||
"version": "0.0.0"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt",
|
||||
"name": "go-net",
|
||||
"version": "0.0.0"
|
||||
},
|
||||
{
|
||||
"author": "whyrusleeping",
|
||||
"hash": "QmUusaX99BZoELh7dmPgirqRQ1FAmMnmnBn3oiqDFGBUSc",
|
||||
|
@ -1,6 +1,7 @@
|
||||
package peerstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sync"
|
||||
@ -13,7 +14,6 @@ import (
|
||||
"github.com/ipfs/go-libp2p-peer"
|
||||
logging "github.com/ipfs/go-log"
|
||||
ma "github.com/jbenet/go-multiaddr"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var log = logging.Logger("peerstore")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package peerstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"sort"
|
||||
@ -9,7 +10,6 @@ import (
|
||||
|
||||
peer "github.com/ipfs/go-libp2p-peer"
|
||||
ma "github.com/jbenet/go-multiaddr"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func getAddrs(t *testing.T, n int) []ma.Multiaddr {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package queue
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
"testing"
|
||||
@ -8,8 +9,6 @@ import (
|
||||
|
||||
u "github.com/ipfs/go-ipfs-util"
|
||||
peer "github.com/ipfs/go-libp2p-peer"
|
||||
|
||||
context "golang.org/x/net/context"
|
||||
)
|
||||
|
||||
func TestQueue(t *testing.T) {
|
||||
|
@ -1,9 +1,10 @@
|
||||
package queue
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
peer "github.com/ipfs/go-libp2p-peer"
|
||||
logging "github.com/ipfs/go-log"
|
||||
context "golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var log = logging.Logger("peerqueue")
|
||||
|
Loading…
Reference in New Issue
Block a user