diff --git a/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/codec.go b/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/codec.go index 9fbd1ca72..8a7d9b7df 100644 --- a/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/codec.go +++ b/Godeps/_workspace/src/github.com/jbenet/go-multiaddr/codec.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) func stringToBytes(s string) ([]byte, error) { diff --git a/Godeps/_workspace/src/github.com/jbenet/go-multihash/multihash/main.go b/Godeps/_workspace/src/github.com/jbenet/go-multihash/multihash/main.go index 9a569aebc..c3aea281d 100644 --- a/Godeps/_workspace/src/github.com/jbenet/go-multihash/multihash/main.go +++ b/Godeps/_workspace/src/github.com/jbenet/go-multihash/multihash/main.go @@ -6,8 +6,8 @@ import ( "io" "os" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - mhopts "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" + mhopts "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash/opts" ) var usage = `usage: %s [options] [FILE] diff --git a/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/coding.go b/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/coding.go index c0f40c450..47fab4070 100644 --- a/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/coding.go +++ b/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/coding.go @@ -6,7 +6,7 @@ import ( "fmt" base58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) func Decode(encoding, digest string) (mh.Multihash, error) { diff --git a/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/opts.go b/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/opts.go index 1ab63eda8..ff8802818 100644 --- a/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/opts.go +++ b/Godeps/_workspace/src/github.com/jbenet/go-multihash/opts/opts.go @@ -11,7 +11,7 @@ import ( "io/ioutil" "strings" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) // package errors diff --git a/blocks/blocks.go b/blocks/blocks.go index ccd779c62..bcf58f747 100644 --- a/blocks/blocks.go +++ b/blocks/blocks.go @@ -6,9 +6,9 @@ import ( "errors" "fmt" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" key "github.com/ipfs/go-ipfs/blocks/key" - u "github.com/ipfs/go-ipfs/util" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // Block is a singular block of data in ipfs diff --git a/blocks/blockstore/blockstore.go b/blocks/blockstore/blockstore.go index 51979e653..42c83b64b 100644 --- a/blocks/blockstore/blockstore.go +++ b/blocks/blockstore/blockstore.go @@ -10,9 +10,9 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" dsns "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/namespace" dsq "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/query" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" blocks "github.com/ipfs/go-ipfs/blocks" key "github.com/ipfs/go-ipfs/blocks/key" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/blocks/key/key.go b/blocks/key/key.go index 656458c1a..edb5de5c2 100644 --- a/blocks/key/key.go +++ b/blocks/key/key.go @@ -6,7 +6,7 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" b58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) // Key is a string representation of multihash for use with maps. diff --git a/blocks/key/key_test.go b/blocks/key/key_test.go index 6699c45d6..bdb1a0675 100644 --- a/blocks/key/key_test.go +++ b/blocks/key/key_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) func TestKey(t *testing.T) { diff --git a/blockservice/test/blocks_test.go b/blockservice/test/blocks_test.go index 8cd5e6dfb..ab6a476aa 100644 --- a/blockservice/test/blocks_test.go +++ b/blockservice/test/blocks_test.go @@ -13,7 +13,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" . "github.com/ipfs/go-ipfs/blockservice" offline "github.com/ipfs/go-ipfs/exchange/offline" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index f3c3a9203..04da54249 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -23,7 +23,7 @@ import ( "github.com/ipfs/go-ipfs/core/corerouting" nodeMount "github.com/ipfs/go-ipfs/fuse/node" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - util "github.com/ipfs/go-ipfs/util" + util "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" conn "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/conn" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/cmd/ipfs/main.go b/cmd/ipfs/main.go index 5fe667c3b..9d74b6049 100644 --- a/cmd/ipfs/main.go +++ b/cmd/ipfs/main.go @@ -28,7 +28,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/commands/cli/parse.go b/commands/cli/parse.go index ce56d327d..ba658a89c 100644 --- a/commands/cli/parse.go +++ b/commands/cli/parse.go @@ -12,7 +12,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" files "github.com/ipfs/go-ipfs/commands/files" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // Parse parses the input commandline string (cmd, flags, and args). diff --git a/commands/option.go b/commands/option.go index f7ec2243b..72c488713 100644 --- a/commands/option.go +++ b/commands/option.go @@ -3,7 +3,7 @@ package commands import ( "reflect" - "github.com/ipfs/go-ipfs/util" + "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // Types of Command options diff --git a/commands/request.go b/commands/request.go index ccc7c0f89..3bd8af694 100644 --- a/commands/request.go +++ b/commands/request.go @@ -12,7 +12,7 @@ import ( "github.com/ipfs/go-ipfs/commands/files" "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/repo/config" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/core/bootstrap.go b/core/bootstrap.go index 46c8451fa..873ca10bd 100644 --- a/core/bootstrap.go +++ b/core/bootstrap.go @@ -9,8 +9,8 @@ import ( "time" config "github.com/ipfs/go-ipfs/repo/config" + lgbl "github.com/ipfs/go-ipfs/thirdparty/loggables" math2 "github.com/ipfs/go-ipfs/thirdparty/math2" - lgbl "github.com/ipfs/go-ipfs/util/eventlog/loggables" host "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/host" inet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" diff --git a/core/bootstrap_test.go b/core/bootstrap_test.go index 0a2fb8b82..2e752f4ed 100644 --- a/core/bootstrap_test.go +++ b/core/bootstrap_test.go @@ -5,7 +5,7 @@ import ( "testing" config "github.com/ipfs/go-ipfs/repo/config" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/core/commands/add.go b/core/commands/add.go index 5d73d9d04..814afc9df 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -10,7 +10,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" files "github.com/ipfs/go-ipfs/commands/files" core "github.com/ipfs/go-ipfs/core" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // Error indicating the max depth has been exceded. diff --git a/core/commands/bitswap.go b/core/commands/bitswap.go index ece9a3f52..3e49c0879 100644 --- a/core/commands/bitswap.go +++ b/core/commands/bitswap.go @@ -10,7 +10,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" cmds "github.com/ipfs/go-ipfs/commands" bitswap "github.com/ipfs/go-ipfs/exchange/bitswap" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/core/commands/block.go b/core/commands/block.go index 3b029430e..dc734d999 100644 --- a/core/commands/block.go +++ b/core/commands/block.go @@ -8,11 +8,11 @@ import ( "io/ioutil" "strings" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" "github.com/ipfs/go-ipfs/blocks" key "github.com/ipfs/go-ipfs/blocks/key" cmds "github.com/ipfs/go-ipfs/commands" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) type BlockStat struct { diff --git a/core/commands/bootstrap.go b/core/commands/bootstrap.go index 9b23122f5..eb3745d26 100644 --- a/core/commands/bootstrap.go +++ b/core/commands/bootstrap.go @@ -10,7 +10,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" "github.com/ipfs/go-ipfs/repo/fsrepo" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) type BootstrapOutput struct { diff --git a/core/commands/config.go b/core/commands/config.go index a776c3bdf..798a0b2a1 100644 --- a/core/commands/config.go +++ b/core/commands/config.go @@ -14,7 +14,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) type ConfigField struct { diff --git a/core/commands/dht.go b/core/commands/dht.go index 782d599a8..094db240e 100644 --- a/core/commands/dht.go +++ b/core/commands/dht.go @@ -12,7 +12,7 @@ import ( notif "github.com/ipfs/go-ipfs/notifications" path "github.com/ipfs/go-ipfs/path" ipdht "github.com/ipfs/go-ipfs/routing/dht" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/core/commands/dns.go b/core/commands/dns.go index 2cbdccd40..c1e5ed3f1 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -6,7 +6,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" namesys "github.com/ipfs/go-ipfs/namesys" - util "github.com/ipfs/go-ipfs/util" + util "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) var DNSCmd = &cmds.Command{ diff --git a/core/commands/id.go b/core/commands/id.go index ad0895b34..3e8557d02 100644 --- a/core/commands/id.go +++ b/core/commands/id.go @@ -13,7 +13,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" kb "github.com/ipfs/go-ipfs/routing/kbucket" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ic "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" identify "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/protocol/identify" diff --git a/core/commands/ipns.go b/core/commands/ipns.go index a542c59b6..063a98350 100644 --- a/core/commands/ipns.go +++ b/core/commands/ipns.go @@ -8,7 +8,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" namesys "github.com/ipfs/go-ipfs/namesys" offline "github.com/ipfs/go-ipfs/routing/offline" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) var IpnsCmd = &cmds.Command{ diff --git a/core/commands/object/object.go b/core/commands/object/object.go index 37dbfee4c..5705d1aec 100644 --- a/core/commands/object/object.go +++ b/core/commands/object/object.go @@ -11,7 +11,7 @@ import ( "strings" "text/tabwriter" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" diff --git a/core/commands/object/patch.go b/core/commands/object/patch.go index 2b5741bb2..df9933fe5 100644 --- a/core/commands/object/patch.go +++ b/core/commands/object/patch.go @@ -12,7 +12,7 @@ import ( dagutils "github.com/ipfs/go-ipfs/merkledag/utils" path "github.com/ipfs/go-ipfs/path" ft "github.com/ipfs/go-ipfs/unixfs" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) var ObjectPatchCmd = &cmds.Command{ diff --git a/core/commands/pin.go b/core/commands/pin.go index cc3333328..28780940f 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -11,7 +11,7 @@ import ( corerepo "github.com/ipfs/go-ipfs/core/corerepo" dag "github.com/ipfs/go-ipfs/merkledag" path "github.com/ipfs/go-ipfs/path" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/core/commands/ping.go b/core/commands/ping.go index 430252a65..1766bdb10 100644 --- a/core/commands/ping.go +++ b/core/commands/ping.go @@ -10,7 +10,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" diff --git a/core/commands/refs.go b/core/commands/refs.go index 2deb5a85a..21ebdd82e 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -12,7 +12,7 @@ import ( "github.com/ipfs/go-ipfs/core" dag "github.com/ipfs/go-ipfs/merkledag" path "github.com/ipfs/go-ipfs/path" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/core/commands/repo.go b/core/commands/repo.go index 7014368a6..3b634e631 100644 --- a/core/commands/repo.go +++ b/core/commands/repo.go @@ -7,7 +7,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" corerepo "github.com/ipfs/go-ipfs/core/corerepo" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) var RepoCmd = &cmds.Command{ diff --git a/core/commands/resolve.go b/core/commands/resolve.go index 430b9008b..85d1a6216 100644 --- a/core/commands/resolve.go +++ b/core/commands/resolve.go @@ -7,7 +7,7 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" "github.com/ipfs/go-ipfs/core" path "github.com/ipfs/go-ipfs/path" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) type ResolvedPath struct { diff --git a/core/commands/stat.go b/core/commands/stat.go index e9d13f0bb..ce3b27431 100644 --- a/core/commands/stat.go +++ b/core/commands/stat.go @@ -10,7 +10,7 @@ import ( humanize "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize" cmds "github.com/ipfs/go-ipfs/commands" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" metrics "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/metrics" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" protocol "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/protocol" diff --git a/core/commands/swarm.go b/core/commands/swarm.go index b99a7edd7..1a0e646ed 100644 --- a/core/commands/swarm.go +++ b/core/commands/swarm.go @@ -9,7 +9,7 @@ import ( "sort" cmds "github.com/ipfs/go-ipfs/commands" - iaddr "github.com/ipfs/go-ipfs/util/ipfsaddr" + iaddr "github.com/ipfs/go-ipfs/thirdparty/ipfsaddr" swarm "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/swarm" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" diff --git a/core/core.go b/core/core.go index 1563511f7..fffcde34e 100644 --- a/core/core.go +++ b/core/core.go @@ -58,7 +58,7 @@ import ( repo "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) const IpnsValidatorTag = "ipns" diff --git a/core/core_test.go b/core/core_test.go index 027a721d0..862956b4b 100644 --- a/core/core_test.go +++ b/core/core_test.go @@ -5,7 +5,7 @@ import ( "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index 7624714fa..551fbf6f5 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -15,7 +15,7 @@ import ( path "github.com/ipfs/go-ipfs/path" repo "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" id "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/protocol/identify" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/core/coreunix/add_test.go b/core/coreunix/add_test.go index f2b2b212d..c773f4621 100644 --- a/core/coreunix/add_test.go +++ b/core/coreunix/add_test.go @@ -14,7 +14,7 @@ import ( "github.com/ipfs/go-ipfs/pin/gc" "github.com/ipfs/go-ipfs/repo" "github.com/ipfs/go-ipfs/repo/config" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/core/coreunix/metadata_test.go b/core/coreunix/metadata_test.go index b180927b2..5d75a542b 100644 --- a/core/coreunix/metadata_test.go +++ b/core/coreunix/metadata_test.go @@ -19,7 +19,7 @@ import ( merkledag "github.com/ipfs/go-ipfs/merkledag" ft "github.com/ipfs/go-ipfs/unixfs" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func getDagserv(t *testing.T) merkledag.DAGService { diff --git a/core/mock/mock.go b/core/mock/mock.go index c9b3cea10..5d1da966d 100644 --- a/core/mock/mock.go +++ b/core/mock/mock.go @@ -11,8 +11,8 @@ import ( core "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" - ds2 "github.com/ipfs/go-ipfs/util/datastore2" - testutil "github.com/ipfs/go-ipfs/util/testutil" + ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" host "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/host" metrics "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/metrics" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" diff --git a/exchange/bitswap/bitswap_test.go b/exchange/bitswap/bitswap_test.go index 435779fd8..22ff04606 100644 --- a/exchange/bitswap/bitswap_test.go +++ b/exchange/bitswap/bitswap_test.go @@ -7,7 +7,7 @@ import ( "time" detectrace "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race" - travis "github.com/ipfs/go-ipfs/util/testutil/ci/travis" + travis "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" blocks "github.com/ipfs/go-ipfs/blocks" diff --git a/exchange/bitswap/decision/bench_test.go b/exchange/bitswap/decision/bench_test.go index 7a230fa57..a761c5b96 100644 --- a/exchange/bitswap/decision/bench_test.go +++ b/exchange/bitswap/decision/bench_test.go @@ -6,7 +6,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/exchange/bitswap/decision/engine_test.go b/exchange/bitswap/decision/engine_test.go index 53a660c7d..b47d4063a 100644 --- a/exchange/bitswap/decision/engine_test.go +++ b/exchange/bitswap/decision/engine_test.go @@ -13,7 +13,7 @@ import ( blocks "github.com/ipfs/go-ipfs/blocks" blockstore "github.com/ipfs/go-ipfs/blocks/blockstore" message "github.com/ipfs/go-ipfs/exchange/bitswap/message" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/exchange/bitswap/decision/peer_request_queue_test.go b/exchange/bitswap/decision/peer_request_queue_test.go index e71782f07..a2d96a9c6 100644 --- a/exchange/bitswap/decision/peer_request_queue_test.go +++ b/exchange/bitswap/decision/peer_request_queue_test.go @@ -9,7 +9,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" "github.com/ipfs/go-ipfs/exchange/bitswap/wantlist" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" ) func TestPushPop(t *testing.T) { diff --git a/exchange/bitswap/testnet/interface.go b/exchange/bitswap/testnet/interface.go index f79af6d62..11be6249b 100644 --- a/exchange/bitswap/testnet/interface.go +++ b/exchange/bitswap/testnet/interface.go @@ -2,7 +2,7 @@ package bitswap import ( bsnet "github.com/ipfs/go-ipfs/exchange/bitswap/network" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/exchange/bitswap/testnet/network_test.go b/exchange/bitswap/testnet/network_test.go index 69f1fa73e..59c912b25 100644 --- a/exchange/bitswap/testnet/network_test.go +++ b/exchange/bitswap/testnet/network_test.go @@ -9,7 +9,7 @@ import ( bsnet "github.com/ipfs/go-ipfs/exchange/bitswap/network" mockrouting "github.com/ipfs/go-ipfs/routing/mock" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/exchange/bitswap/testnet/peernet.go b/exchange/bitswap/testnet/peernet.go index 8b0d7aabe..4224ad73d 100644 --- a/exchange/bitswap/testnet/peernet.go +++ b/exchange/bitswap/testnet/peernet.go @@ -4,7 +4,7 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" bsnet "github.com/ipfs/go-ipfs/exchange/bitswap/network" mockrouting "github.com/ipfs/go-ipfs/routing/mock" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" mockpeernet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/exchange/bitswap/testnet/virtual.go b/exchange/bitswap/testnet/virtual.go index b7b2e7472..1c69337e9 100644 --- a/exchange/bitswap/testnet/virtual.go +++ b/exchange/bitswap/testnet/virtual.go @@ -9,7 +9,7 @@ import ( routing "github.com/ipfs/go-ipfs/routing" mockrouting "github.com/ipfs/go-ipfs/routing/mock" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/exchange/bitswap/testutils.go b/exchange/bitswap/testutils.go index 8a8861771..19037dafe 100644 --- a/exchange/bitswap/testutils.go +++ b/exchange/bitswap/testutils.go @@ -7,9 +7,9 @@ import ( ds_sync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" blockstore "github.com/ipfs/go-ipfs/blocks/blockstore" tn "github.com/ipfs/go-ipfs/exchange/bitswap/testnet" + datastore2 "github.com/ipfs/go-ipfs/thirdparty/datastore2" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - datastore2 "github.com/ipfs/go-ipfs/util/datastore2" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" p2ptestutil "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/test/util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/exchange/reprovide/reprovide_test.go b/exchange/reprovide/reprovide_test.go index ea49ed932..c593ae00a 100644 --- a/exchange/reprovide/reprovide_test.go +++ b/exchange/reprovide/reprovide_test.go @@ -8,7 +8,7 @@ import ( blocks "github.com/ipfs/go-ipfs/blocks" blockstore "github.com/ipfs/go-ipfs/blocks/blockstore" mock "github.com/ipfs/go-ipfs/routing/mock" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" . "github.com/ipfs/go-ipfs/exchange/reprovide" diff --git a/fuse/ipns/ipns_test.go b/fuse/ipns/ipns_test.go index 15b02eea9..c4456298d 100644 --- a/fuse/ipns/ipns_test.go +++ b/fuse/ipns/ipns_test.go @@ -17,8 +17,8 @@ import ( core "github.com/ipfs/go-ipfs/core" namesys "github.com/ipfs/go-ipfs/namesys" offroute "github.com/ipfs/go-ipfs/routing/offline" - u "github.com/ipfs/go-ipfs/util" - ci "github.com/ipfs/go-ipfs/util/testutil/ci" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" + ci "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util/testutil/ci" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/fuse/node/mount_test.go b/fuse/node/mount_test.go index 6b50ea294..ec446b3e8 100644 --- a/fuse/node/mount_test.go +++ b/fuse/node/mount_test.go @@ -15,7 +15,7 @@ import ( mount "github.com/ipfs/go-ipfs/fuse/mount" namesys "github.com/ipfs/go-ipfs/namesys" offroute "github.com/ipfs/go-ipfs/routing/offline" - ci "github.com/ipfs/go-ipfs/util/testutil/ci" + ci "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util/testutil/ci" ) func maybeSkipFuseTests(t *testing.T) { diff --git a/fuse/readonly/ipfs_test.go b/fuse/readonly/ipfs_test.go index 7bfba7497..ad8a5bb58 100644 --- a/fuse/readonly/ipfs_test.go +++ b/fuse/readonly/ipfs_test.go @@ -23,8 +23,8 @@ import ( chunk "github.com/ipfs/go-ipfs/importer/chunk" dag "github.com/ipfs/go-ipfs/merkledag" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" - ci "github.com/ipfs/go-ipfs/util/testutil/ci" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" + ci "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util/testutil/ci" ) func maybeSkipFuseTests(t *testing.T) { diff --git a/fuse/readonly/readonly_unix.go b/fuse/readonly/readonly_unix.go index 062a892bb..f2585f578 100644 --- a/fuse/readonly/readonly_unix.go +++ b/fuse/readonly/readonly_unix.go @@ -11,13 +11,13 @@ import ( fuse "github.com/ipfs/go-ipfs/Godeps/_workspace/src/bazil.org/fuse" fs "github.com/ipfs/go-ipfs/Godeps/_workspace/src/bazil.org/fuse/fs" - proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" core "github.com/ipfs/go-ipfs/core" mdag "github.com/ipfs/go-ipfs/merkledag" path "github.com/ipfs/go-ipfs/path" + lgbl "github.com/ipfs/go-ipfs/thirdparty/loggables" uio "github.com/ipfs/go-ipfs/unixfs/io" ftpb "github.com/ipfs/go-ipfs/unixfs/pb" - lgbl "github.com/ipfs/go-ipfs/util/eventlog/loggables" + proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/importer/balanced/balanced_test.go b/importer/balanced/balanced_test.go index 2182615c5..60a479fdf 100644 --- a/importer/balanced/balanced_test.go +++ b/importer/balanced/balanced_test.go @@ -15,7 +15,7 @@ import ( mdtest "github.com/ipfs/go-ipfs/merkledag/test" pin "github.com/ipfs/go-ipfs/pin" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/importer/chunk/rabin_test.go b/importer/chunk/rabin_test.go index b4e1b2dc4..7702d3e76 100644 --- a/importer/chunk/rabin_test.go +++ b/importer/chunk/rabin_test.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/ipfs/go-ipfs/blocks" "github.com/ipfs/go-ipfs/blocks/key" - "github.com/ipfs/go-ipfs/util" + "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" "io" "testing" ) diff --git a/importer/chunk/splitting_test.go b/importer/chunk/splitting_test.go index 27b2a7b7a..83dcaadba 100644 --- a/importer/chunk/splitting_test.go +++ b/importer/chunk/splitting_test.go @@ -5,7 +5,7 @@ import ( "io" "testing" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func randBuf(t *testing.T, size int) []byte { diff --git a/importer/importer_test.go b/importer/importer_test.go index 306e62219..02e24c6fa 100644 --- a/importer/importer_test.go +++ b/importer/importer_test.go @@ -10,7 +10,7 @@ import ( dag "github.com/ipfs/go-ipfs/merkledag" mdtest "github.com/ipfs/go-ipfs/merkledag/test" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/importer/trickle/trickle_test.go b/importer/trickle/trickle_test.go index 9581907ff..1dd435088 100644 --- a/importer/trickle/trickle_test.go +++ b/importer/trickle/trickle_test.go @@ -16,7 +16,7 @@ import ( pin "github.com/ipfs/go-ipfs/pin" ft "github.com/ipfs/go-ipfs/unixfs" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/merkledag/coding.go b/merkledag/coding.go index b678c3b44..1c57125fb 100644 --- a/merkledag/coding.go +++ b/merkledag/coding.go @@ -4,10 +4,10 @@ import ( "fmt" "sort" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" pb "github.com/ipfs/go-ipfs/merkledag/pb" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // for now, we use a PBNode intermediate thing. diff --git a/merkledag/merkledag_test.go b/merkledag/merkledag_test.go index d9622082e..91bc2c0f7 100644 --- a/merkledag/merkledag_test.go +++ b/merkledag/merkledag_test.go @@ -22,7 +22,7 @@ import ( . "github.com/ipfs/go-ipfs/merkledag" "github.com/ipfs/go-ipfs/pin" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/merkledag/node.go b/merkledag/node.go index c5e1c4e33..b5e95f81b 100644 --- a/merkledag/node.go +++ b/merkledag/node.go @@ -5,7 +5,7 @@ import ( "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" key "github.com/ipfs/go-ipfs/blocks/key" ) diff --git a/mfs/mfs_test.go b/mfs/mfs_test.go index 060f8083c..a56b68939 100644 --- a/mfs/mfs_test.go +++ b/mfs/mfs_test.go @@ -28,7 +28,7 @@ import ( dag "github.com/ipfs/go-ipfs/merkledag" ft "github.com/ipfs/go-ipfs/unixfs" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func getDagserv(t *testing.T) dag.DAGService { diff --git a/mfs/repub_test.go b/mfs/repub_test.go index 4ba7bae4f..32e0b2b27 100644 --- a/mfs/repub_test.go +++ b/mfs/repub_test.go @@ -5,7 +5,7 @@ import ( "time" key "github.com/ipfs/go-ipfs/blocks/key" - ci "github.com/ipfs/go-ipfs/util/testutil/ci" + ci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/namesys/ipns_select_test.go b/namesys/ipns_select_test.go index fb171e901..b6ffe1c40 100644 --- a/namesys/ipns_select_test.go +++ b/namesys/ipns_select_test.go @@ -10,7 +10,7 @@ import ( pb "github.com/ipfs/go-ipfs/namesys/pb" path "github.com/ipfs/go-ipfs/path" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" ) diff --git a/namesys/publisher.go b/namesys/publisher.go index 241b40d3a..4f3cfaf2e 100644 --- a/namesys/publisher.go +++ b/namesys/publisher.go @@ -19,7 +19,7 @@ import ( dhtpb "github.com/ipfs/go-ipfs/routing/dht/pb" record "github.com/ipfs/go-ipfs/routing/record" ft "github.com/ipfs/go-ipfs/unixfs" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/namesys/resolve_test.go b/namesys/resolve_test.go index 555b3055a..69f03f035 100644 --- a/namesys/resolve_test.go +++ b/namesys/resolve_test.go @@ -10,9 +10,9 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" path "github.com/ipfs/go-ipfs/path" mockrouting "github.com/ipfs/go-ipfs/routing/mock" - u "github.com/ipfs/go-ipfs/util" - testutil "github.com/ipfs/go-ipfs/util/testutil" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/namesys/routing.go b/namesys/routing.go index 7d499fe61..b10c22490 100644 --- a/namesys/routing.go +++ b/namesys/routing.go @@ -6,14 +6,14 @@ import ( proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" lru "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/hashicorp/golang-lru" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" pb "github.com/ipfs/go-ipfs/namesys/pb" path "github.com/ipfs/go-ipfs/path" routing "github.com/ipfs/go-ipfs/routing" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/path/path.go b/path/path.go index 0891e8466..c06973417 100644 --- a/path/path.go +++ b/path/path.go @@ -8,7 +8,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" b58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" ) // ErrBadPath is returned when a given path is incorrectly formatted diff --git a/path/resolver.go b/path/resolver.go index 569a4d1be..10368bbfd 100644 --- a/path/resolver.go +++ b/path/resolver.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" diff --git a/path/resolver_test.go b/path/resolver_test.go index 9ebb3f7a9..7f5f756c4 100644 --- a/path/resolver_test.go +++ b/path/resolver_test.go @@ -10,7 +10,7 @@ import ( merkledag "github.com/ipfs/go-ipfs/merkledag" dagmock "github.com/ipfs/go-ipfs/merkledag/test" path "github.com/ipfs/go-ipfs/path" - util "github.com/ipfs/go-ipfs/util" + util "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func randNode() (*merkledag.Node, key.Key) { diff --git a/pin/pin_test.go b/pin/pin_test.go index 5dd9c45cf..9eb61acef 100644 --- a/pin/pin_test.go +++ b/pin/pin_test.go @@ -13,7 +13,7 @@ import ( bs "github.com/ipfs/go-ipfs/blockservice" "github.com/ipfs/go-ipfs/exchange/offline" mdag "github.com/ipfs/go-ipfs/merkledag" - "github.com/ipfs/go-ipfs/util" + "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func randNode() (*mdag.Node, key.Key) { diff --git a/repo/config/bootstrap_peers.go b/repo/config/bootstrap_peers.go index fa607c842..c880913a1 100644 --- a/repo/config/bootstrap_peers.go +++ b/repo/config/bootstrap_peers.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - iaddr "github.com/ipfs/go-ipfs/util/ipfsaddr" + iaddr "github.com/ipfs/go-ipfs/thirdparty/ipfsaddr" ) // DefaultBootstrapAddresses are the hardcoded bootstrap addresses diff --git a/repo/config/config.go b/repo/config/config.go index 762802561..bfe9be1de 100644 --- a/repo/config/config.go +++ b/repo/config/config.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - u "github.com/ipfs/go-ipfs/util" + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) @@ -48,7 +48,7 @@ func PathRoot() (string, error) { dir := os.Getenv(EnvDir) var err error if len(dir) == 0 { - dir, err = u.TildeExpansion(DefaultPathRoot) + dir, err = homedir.Expand(DefaultPathRoot) } return dir, err } diff --git a/repo/config/supernode.go b/repo/config/supernode.go index 30ee6f22e..de403fadd 100644 --- a/repo/config/supernode.go +++ b/repo/config/supernode.go @@ -1,6 +1,6 @@ package config -import "github.com/ipfs/go-ipfs/util/ipfsaddr" +import "github.com/ipfs/go-ipfs/thirdparty/ipfsaddr" // TODO replace with final servers before merge diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 356e33cd1..0e21cfa6a 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -12,6 +12,7 @@ import ( "sync" "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/measure" + "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir" repo "github.com/ipfs/go-ipfs/repo" "github.com/ipfs/go-ipfs/repo/common" config "github.com/ipfs/go-ipfs/repo/config" @@ -19,7 +20,7 @@ import ( mfsr "github.com/ipfs/go-ipfs/repo/fsrepo/migrations" serialize "github.com/ipfs/go-ipfs/repo/fsrepo/serialize" dir "github.com/ipfs/go-ipfs/thirdparty/dir" - util "github.com/ipfs/go-ipfs/util" + util "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) @@ -156,7 +157,7 @@ func open(repoPath string) (repo.Repo, error) { } func newFSRepo(rpath string) (*FSRepo, error) { - expPath, err := util.TildeExpansion(filepath.Clean(rpath)) + expPath, err := homedir.Expand(filepath.Clean(rpath)) if err != nil { return nil, err } diff --git a/repo/fsrepo/lock/lock.go b/repo/fsrepo/lock/lock.go index c8f953f7e..34f2d2339 100644 --- a/repo/fsrepo/lock/lock.go +++ b/repo/fsrepo/lock/lock.go @@ -9,7 +9,7 @@ import ( "syscall" lock "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/camlistore/lock" - "github.com/ipfs/go-ipfs/util" + "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // LockFile is the filename of the repo lock, relative to config dir diff --git a/repo/fsrepo/serialize/serialize.go b/repo/fsrepo/serialize/serialize.go index 64e897b78..0c93727fd 100644 --- a/repo/fsrepo/serialize/serialize.go +++ b/repo/fsrepo/serialize/serialize.go @@ -10,7 +10,7 @@ import ( "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/facebookgo/atomicfile" "github.com/ipfs/go-ipfs/repo/config" - "github.com/ipfs/go-ipfs/util" + "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/routing/dht/dht_bootstrap.go b/routing/dht/dht_bootstrap.go index b059c11d6..b544884fc 100644 --- a/routing/dht/dht_bootstrap.go +++ b/routing/dht/dht_bootstrap.go @@ -9,7 +9,7 @@ import ( "time" routing "github.com/ipfs/go-ipfs/routing" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" goprocess "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess" diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index 55ed11c55..3834c75e7 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -17,12 +17,12 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" routing "github.com/ipfs/go-ipfs/routing" record "github.com/ipfs/go-ipfs/routing/record" - u "github.com/ipfs/go-ipfs/util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" netutil "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/test/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" - ci "github.com/ipfs/go-ipfs/util/testutil/ci" - travisci "github.com/ipfs/go-ipfs/util/testutil/ci/travis" + ci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci" + travisci "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis" ) var testCaseValues = map[key.Key][]byte{} diff --git a/routing/dht/ext_test.go b/routing/dht/ext_test.go index dad0ac645..41048df2a 100644 --- a/routing/dht/ext_test.go +++ b/routing/dht/ext_test.go @@ -16,7 +16,7 @@ import ( routing "github.com/ipfs/go-ipfs/routing" pb "github.com/ipfs/go-ipfs/routing/dht/pb" record "github.com/ipfs/go-ipfs/routing/record" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" inet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" diff --git a/routing/dht/handlers.go b/routing/dht/handlers.go index 84320ab5d..ea8996416 100644 --- a/routing/dht/handlers.go +++ b/routing/dht/handlers.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" key "github.com/ipfs/go-ipfs/blocks/key" pb "github.com/ipfs/go-ipfs/routing/dht/pb" - u "github.com/ipfs/go-ipfs/util" - lgbl "github.com/ipfs/go-ipfs/util/eventlog/loggables" + lgbl "github.com/ipfs/go-ipfs/thirdparty/loggables" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" + proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/dht/lookup.go b/routing/dht/lookup.go index 140fcae21..2def4046b 100644 --- a/routing/dht/lookup.go +++ b/routing/dht/lookup.go @@ -4,7 +4,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" notif "github.com/ipfs/go-ipfs/notifications" kb "github.com/ipfs/go-ipfs/routing/kbucket" - pset "github.com/ipfs/go-ipfs/util/peerset" + pset "github.com/ipfs/go-ipfs/thirdparty/peerset" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/dht/query.go b/routing/dht/query.go index e7dc7a8e1..518f1e11f 100644 --- a/routing/dht/query.go +++ b/routing/dht/query.go @@ -6,11 +6,11 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" notif "github.com/ipfs/go-ipfs/notifications" "github.com/ipfs/go-ipfs/routing" - u "github.com/ipfs/go-ipfs/util" - pset "github.com/ipfs/go-ipfs/util/peerset" - todoctr "github.com/ipfs/go-ipfs/util/todocounter" + pset "github.com/ipfs/go-ipfs/thirdparty/peerset" + todoctr "github.com/ipfs/go-ipfs/thirdparty/todocounter" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" queue "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer/queue" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" process "gx/ipfs/QmQopLATEYMNg7dVqZRNDfeE2S1yKy8zrRh5xnYiuqeZBn/goprocess" diff --git a/routing/dht/routing.go b/routing/dht/routing.go index e0feda4ec..5a7430122 100644 --- a/routing/dht/routing.go +++ b/routing/dht/routing.go @@ -11,7 +11,7 @@ import ( pb "github.com/ipfs/go-ipfs/routing/dht/pb" kb "github.com/ipfs/go-ipfs/routing/kbucket" record "github.com/ipfs/go-ipfs/routing/record" - pset "github.com/ipfs/go-ipfs/util/peerset" + pset "github.com/ipfs/go-ipfs/thirdparty/peerset" inet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/routing/kbucket/table_test.go b/routing/kbucket/table_test.go index 13f02df89..a023dba4e 100644 --- a/routing/kbucket/table_test.go +++ b/routing/kbucket/table_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - tu "github.com/ipfs/go-ipfs/util/testutil" + tu "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/routing/kbucket/util.go b/routing/kbucket/util.go index 73602d185..df3237822 100644 --- a/routing/kbucket/util.go +++ b/routing/kbucket/util.go @@ -7,7 +7,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" ks "github.com/ipfs/go-ipfs/routing/keyspace" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/routing/keyspace/xor.go b/routing/keyspace/xor.go index 8fae7744f..fd96fd65b 100644 --- a/routing/keyspace/xor.go +++ b/routing/keyspace/xor.go @@ -5,7 +5,7 @@ import ( "crypto/sha256" "math/big" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) // XORKeySpace is a KeySpace which: diff --git a/routing/keyspace/xor_test.go b/routing/keyspace/xor_test.go index cac274278..a461c094e 100644 --- a/routing/keyspace/xor_test.go +++ b/routing/keyspace/xor_test.go @@ -5,7 +5,7 @@ import ( "math/big" "testing" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ) func TestPrefixLen(t *testing.T) { diff --git a/routing/mock/centralized_client.go b/routing/mock/centralized_client.go index 15e7eebeb..4f29a5776 100644 --- a/routing/mock/centralized_client.go +++ b/routing/mock/centralized_client.go @@ -4,15 +4,15 @@ import ( "errors" "time" - proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" key "github.com/ipfs/go-ipfs/blocks/key" routing "github.com/ipfs/go-ipfs/routing" dhtpb "github.com/ipfs/go-ipfs/routing/dht/pb" - u "github.com/ipfs/go-ipfs/util" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" + proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/routing/mock/centralized_server.go b/routing/mock/centralized_server.go index c05ca9460..cc57e6a07 100644 --- a/routing/mock/centralized_server.go +++ b/routing/mock/centralized_server.go @@ -8,7 +8,7 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" key "github.com/ipfs/go-ipfs/blocks/key" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/mock/centralized_test.go b/routing/mock/centralized_test.go index d71b24c0b..0bafda9b2 100644 --- a/routing/mock/centralized_test.go +++ b/routing/mock/centralized_test.go @@ -6,7 +6,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/mock/dht.go b/routing/mock/dht.go index 99ef8ba88..96be2a489 100644 --- a/routing/mock/dht.go +++ b/routing/mock/dht.go @@ -4,7 +4,7 @@ import ( ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" sync "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" dht "github.com/ipfs/go-ipfs/routing/dht" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/mock/interface.go b/routing/mock/interface.go index 75daee9e9..69035c232 100644 --- a/routing/mock/interface.go +++ b/routing/mock/interface.go @@ -9,7 +9,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" routing "github.com/ipfs/go-ipfs/routing" delay "github.com/ipfs/go-ipfs/thirdparty/delay" - "github.com/ipfs/go-ipfs/util/testutil" + "github.com/ipfs/go-ipfs/thirdparty/testutil" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" ) diff --git a/routing/record/validation.go b/routing/record/validation.go index 32c33e966..a898259c6 100644 --- a/routing/record/validation.go +++ b/routing/record/validation.go @@ -7,7 +7,7 @@ import ( key "github.com/ipfs/go-ipfs/blocks/key" path "github.com/ipfs/go-ipfs/path" pb "github.com/ipfs/go-ipfs/routing/dht/pb" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" ) diff --git a/test/integration/addcat_test.go b/test/integration/addcat_test.go index b59fb4637..21a4cc208 100644 --- a/test/integration/addcat_test.go +++ b/test/integration/addcat_test.go @@ -16,8 +16,8 @@ import ( "github.com/ipfs/go-ipfs/core" coreunix "github.com/ipfs/go-ipfs/core/coreunix" mock "github.com/ipfs/go-ipfs/core/mock" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" "github.com/ipfs/go-ipfs/thirdparty/unit" - testutil "github.com/ipfs/go-ipfs/util/testutil" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" diff --git a/test/integration/bench_cat_test.go b/test/integration/bench_cat_test.go index a54b8d957..598ee3b25 100644 --- a/test/integration/bench_cat_test.go +++ b/test/integration/bench_cat_test.go @@ -10,8 +10,8 @@ import ( "github.com/ipfs/go-ipfs/core" coreunix "github.com/ipfs/go-ipfs/core/coreunix" mock "github.com/ipfs/go-ipfs/core/mock" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" "github.com/ipfs/go-ipfs/thirdparty/unit" - testutil "github.com/ipfs/go-ipfs/util/testutil" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/test/integration/bench_test.go b/test/integration/bench_test.go index eaadf2702..702e5ea2c 100644 --- a/test/integration/bench_test.go +++ b/test/integration/bench_test.go @@ -3,8 +3,8 @@ package integrationtest import ( "testing" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" "github.com/ipfs/go-ipfs/thirdparty/unit" - testutil "github.com/ipfs/go-ipfs/util/testutil" ) func benchmarkAddCat(numBytes int64, conf testutil.LatencyConfig, b *testing.B) { diff --git a/test/integration/grandcentral_test.go b/test/integration/grandcentral_test.go index 873e95ffd..6273aa345 100644 --- a/test/integration/grandcentral_test.go +++ b/test/integration/grandcentral_test.go @@ -17,9 +17,9 @@ import ( "github.com/ipfs/go-ipfs/core/corerouting" "github.com/ipfs/go-ipfs/core/coreunix" mock "github.com/ipfs/go-ipfs/core/mock" + ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" "github.com/ipfs/go-ipfs/thirdparty/unit" - ds2 "github.com/ipfs/go-ipfs/util/datastore2" - testutil "github.com/ipfs/go-ipfs/util/testutil" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/test/integration/three_legged_cat_test.go b/test/integration/three_legged_cat_test.go index 5d48affdd..6c0844a55 100644 --- a/test/integration/three_legged_cat_test.go +++ b/test/integration/three_legged_cat_test.go @@ -13,8 +13,8 @@ import ( core "github.com/ipfs/go-ipfs/core" coreunix "github.com/ipfs/go-ipfs/core/coreunix" mock "github.com/ipfs/go-ipfs/core/mock" + testutil "github.com/ipfs/go-ipfs/thirdparty/testutil" "github.com/ipfs/go-ipfs/thirdparty/unit" - testutil "github.com/ipfs/go-ipfs/util/testutil" mocknet "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/net/mock" "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" ) diff --git a/test/supernode_client/main.go b/test/supernode_client/main.go index 4643dcc5c..cb27d12ec 100644 --- a/test/supernode_client/main.go +++ b/test/supernode_client/main.go @@ -13,7 +13,7 @@ import ( "time" random "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random" - "github.com/ipfs/go-ipfs/util/ipfsaddr" + "github.com/ipfs/go-ipfs/thirdparty/ipfsaddr" ma "gx/ipfs/QmR3JkmZBKYXgNMNsNZawm914455Qof3PEopwuVSeXG7aV/go-multiaddr" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" @@ -27,8 +27,8 @@ import ( "github.com/ipfs/go-ipfs/repo" config "github.com/ipfs/go-ipfs/repo/config" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" + ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2" unit "github.com/ipfs/go-ipfs/thirdparty/unit" - ds2 "github.com/ipfs/go-ipfs/util/datastore2" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" logging "gx/ipfs/Qmazh5oNUVsDZTs2g59rq8aYQqwpss8tcUWQzor5sCCEuH/go-log" ) diff --git a/util/datastore2/datastore_closer.go b/thirdparty/datastore2/datastore_closer.go similarity index 100% rename from util/datastore2/datastore_closer.go rename to thirdparty/datastore2/datastore_closer.go diff --git a/util/datastore2/delayed.go b/thirdparty/datastore2/delayed.go similarity index 100% rename from util/datastore2/delayed.go rename to thirdparty/datastore2/delayed.go diff --git a/util/datastore2/threadsafe.go b/thirdparty/datastore2/threadsafe.go similarity index 100% rename from util/datastore2/threadsafe.go rename to thirdparty/datastore2/threadsafe.go diff --git a/util/ipfsaddr/ipfsaddr.go b/thirdparty/ipfsaddr/ipfsaddr.go similarity index 100% rename from util/ipfsaddr/ipfsaddr.go rename to thirdparty/ipfsaddr/ipfsaddr.go diff --git a/util/ipfsaddr/ipfsaddr_test.go b/thirdparty/ipfsaddr/ipfsaddr_test.go similarity index 100% rename from util/ipfsaddr/ipfsaddr_test.go rename to thirdparty/ipfsaddr/ipfsaddr_test.go diff --git a/util/eventlog/loggables/loggables.go b/thirdparty/loggables/loggables.go similarity index 100% rename from util/eventlog/loggables/loggables.go rename to thirdparty/loggables/loggables.go diff --git a/util/peerset/peerset.go b/thirdparty/peerset/peerset.go similarity index 100% rename from util/peerset/peerset.go rename to thirdparty/peerset/peerset.go diff --git a/util/testutil/ci/ci.go b/thirdparty/testutil/ci/ci.go similarity index 94% rename from util/testutil/ci/ci.go rename to thirdparty/testutil/ci/ci.go index 45b0b7767..490b89000 100644 --- a/util/testutil/ci/ci.go +++ b/thirdparty/testutil/ci/ci.go @@ -6,7 +6,7 @@ package ci import ( "os" - travis "github.com/ipfs/go-ipfs/util/testutil/ci/travis" + travis "github.com/ipfs/go-ipfs/thirdparty/testutil/ci/travis" ) // EnvVar is a type to use travis-only env var names with diff --git a/util/testutil/ci/travis/travis.go b/thirdparty/testutil/ci/travis/travis.go similarity index 100% rename from util/testutil/ci/travis/travis.go rename to thirdparty/testutil/ci/travis/travis.go diff --git a/util/testutil/ci/travis/travis_test.go b/thirdparty/testutil/ci/travis/travis_test.go similarity index 100% rename from util/testutil/ci/travis/travis_test.go rename to thirdparty/testutil/ci/travis/travis_test.go diff --git a/util/testutil/datastore.go b/thirdparty/testutil/datastore.go similarity index 86% rename from util/testutil/datastore.go rename to thirdparty/testutil/datastore.go index 41a9cc1fc..b60c755c8 100644 --- a/util/testutil/datastore.go +++ b/thirdparty/testutil/datastore.go @@ -3,7 +3,7 @@ package testutil import ( "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" syncds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync" - ds2 "github.com/ipfs/go-ipfs/util/datastore2" + ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2" ) func ThreadSafeCloserMapDatastore() ds2.ThreadSafeDatastoreCloser { diff --git a/util/testutil/gen.go b/thirdparty/testutil/gen.go similarity index 98% rename from util/testutil/gen.go rename to thirdparty/testutil/gen.go index 4ac55a0f4..2a2b3b9b1 100644 --- a/util/testutil/gen.go +++ b/thirdparty/testutil/gen.go @@ -8,7 +8,7 @@ import ( "sync" "testing" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ci "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/crypto" peer "gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer" diff --git a/util/testutil/identity.go b/thirdparty/testutil/identity.go similarity index 100% rename from util/testutil/identity.go rename to thirdparty/testutil/identity.go diff --git a/util/testutil/latency_config.go b/thirdparty/testutil/latency_config.go similarity index 100% rename from util/testutil/latency_config.go rename to thirdparty/testutil/latency_config.go diff --git a/util/testutil/rand.go b/thirdparty/testutil/rand.go similarity index 100% rename from util/testutil/rand.go rename to thirdparty/testutil/rand.go diff --git a/util/todocounter/counter.go b/thirdparty/todocounter/counter.go similarity index 100% rename from util/todocounter/counter.go rename to thirdparty/todocounter/counter.go diff --git a/unixfs/mod/dagmodifier.go b/unixfs/mod/dagmodifier.go index 38d4459d9..ec7072597 100644 --- a/unixfs/mod/dagmodifier.go +++ b/unixfs/mod/dagmodifier.go @@ -7,7 +7,7 @@ import ( "os" proto "gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" + mh "gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" key "github.com/ipfs/go-ipfs/blocks/key" diff --git a/unixfs/mod/dagmodifier_test.go b/unixfs/mod/dagmodifier_test.go index 0cd4a2f10..a5ed5dc1b 100644 --- a/unixfs/mod/dagmodifier_test.go +++ b/unixfs/mod/dagmodifier_test.go @@ -18,7 +18,7 @@ import ( mdag "github.com/ipfs/go-ipfs/merkledag" ft "github.com/ipfs/go-ipfs/unixfs" uio "github.com/ipfs/go-ipfs/unixfs/io" - u "github.com/ipfs/go-ipfs/util" + u "gx/ipfs/QmZNVWh8LLjAavuQ2JXuFmuYH3C11xo988vSgp7UQrTRj1/go-ipfs-util" ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" diff --git a/util/context.go b/util/context.go deleted file mode 100644 index 77504b16d..000000000 --- a/util/context.go +++ /dev/null @@ -1,35 +0,0 @@ -package util - -import ( - context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" -) - -// privateChanType protects the channel. Since this is a package-private type, -// only methods defined in this package can get the error value from the -// context. -type privateChanType chan error - -const errLogKey = "the key used to extract the error log from the context" - -// ContextWithErrorLog returns a copy of parent and an error channel that can -// be used to receive errors sent with the LogError method. -func ContextWithErrorLog(parent context.Context) (context.Context, <-chan error) { - errs := make(privateChanType) - ctx := context.WithValue(parent, errLogKey, errs) - return ctx, errs -} - -// LogError logs the error to the owner of the context. -// -// If this context was created with ContextWithErrorLog, then this method -// passes the error to context creator over an unbuffered channel. -// -// If this context was created by other means, this method is a no-op. -func LogError(ctx context.Context, err error) { - v := ctx.Value(errLogKey) - errs, ok := v.(privateChanType) - if !ok { - return - } - errs <- err -} diff --git a/util/context_test.go b/util/context_test.go deleted file mode 100644 index d9428d6b5..000000000 --- a/util/context_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package util - -import ( - "errors" - "testing" - - context "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" -) - -func TestLogErrorDoesNotBlockWhenCtxIsNotSetUpForLogging(t *testing.T) { - ctx := context.Background() - LogError(ctx, errors.New("ignore me")) -} - -func TestLogErrorReceivedByParent(t *testing.T) { - - expected := errors.New("From child to parent") - - ctx, errs := ContextWithErrorLog(context.Background()) - - go func() { - LogError(ctx, expected) - }() - - if err := <-errs; err != expected { - t.Fatal("didn't receive the expected error") - } -} diff --git a/util/do.go b/util/do.go deleted file mode 100644 index 84384d709..000000000 --- a/util/do.go +++ /dev/null @@ -1,22 +0,0 @@ -package util - -import "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" - -func ContextDo(ctx context.Context, f func() error) error { - - ch := make(chan error) - - go func() { - select { - case <-ctx.Done(): - case ch <- f(): - } - }() - select { - case <-ctx.Done(): - return ctx.Err() - case val := <-ch: - return val - } - return nil -} diff --git a/util/do_test.go b/util/do_test.go deleted file mode 100644 index 7b77a48bb..000000000 --- a/util/do_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package util - -import ( - "errors" - "testing" - - "gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context" -) - -func TestDoReturnsContextErr(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - ch := make(chan struct{}) - err := ContextDo(ctx, func() error { - cancel() - ch <- struct{}{} // won't return - return nil - }) - if err != ctx.Err() { - t.Fail() - } -} - -func TestDoReturnsFuncError(t *testing.T) { - ctx := context.Background() - expected := errors.New("expected to be returned by ContextDo") - err := ContextDo(ctx, func() error { - return expected - }) - if err != expected { - t.Fail() - } -} - -func TestDoReturnsNil(t *testing.T) { - ctx := context.Background() - err := ContextDo(ctx, func() error { - return nil - }) - if err != nil { - t.Fail() - } -} diff --git a/util/file.go b/util/file.go deleted file mode 100644 index e3bd49d71..000000000 --- a/util/file.go +++ /dev/null @@ -1,11 +0,0 @@ -package util - -import "os" - -func FileExists(filename string) bool { - fi, err := os.Lstat(filename) - if fi != nil || (err != nil && !os.IsNotExist(err)) { - return true - } - return false -} diff --git a/util/file_test.go b/util/file_test.go deleted file mode 100644 index 040b22927..000000000 --- a/util/file_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package util - -import "testing" - -func TestFileDoesNotExist(t *testing.T) { - t.Parallel() - if FileExists("i would be surprised to discover that this file exists") { - t.Fail() - } -} diff --git a/util/pipes/duplex.go b/util/pipes/duplex.go deleted file mode 100644 index 14f5e480c..000000000 --- a/util/pipes/duplex.go +++ /dev/null @@ -1,14 +0,0 @@ -package pipes - -// Duplex is a simple duplex channel -type Duplex struct { - In chan []byte - Out chan []byte -} - -func NewDuplex(bufsize int) Duplex { - return Duplex{ - In: make(chan []byte, bufsize), - Out: make(chan []byte, bufsize), - } -} diff --git a/util/sadhack/godep.go b/util/sadhack/godep.go deleted file mode 100644 index b7515531c..000000000 --- a/util/sadhack/godep.go +++ /dev/null @@ -1,9 +0,0 @@ -package util - -// FIXME: we need the go-random/random utility for our sharness test wich depends on go-humanize -// Godep will drop it if we dont use it in ipfs. There should be a better way to do this. -import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/dustin/go-humanize" - -// imported by chegga/pb on windows, this is here so running godeps on non-windows doesnt -// drop it from our vendoring -import _ "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/olekukonko/ts" diff --git a/util/time.go b/util/time.go deleted file mode 100644 index 5fc6ec66d..000000000 --- a/util/time.go +++ /dev/null @@ -1,17 +0,0 @@ -package util - -import "time" - -var TimeFormatIpfs = time.RFC3339Nano - -func ParseRFC3339(s string) (time.Time, error) { - t, err := time.Parse(TimeFormatIpfs, s) - if err != nil { - return time.Time{}, err - } - return t.UTC(), nil -} - -func FormatRFC3339(t time.Time) string { - return t.UTC().Format(TimeFormatIpfs) -} diff --git a/util/time_test.go b/util/time_test.go deleted file mode 100644 index b5a98caa6..000000000 --- a/util/time_test.go +++ /dev/null @@ -1,16 +0,0 @@ -package util - -import ( - "testing" - "time" -) - -func TestTimeFormatParseInversion(t *testing.T) { - v, err := ParseRFC3339(FormatRFC3339(time.Now())) - if err != nil { - t.Fatal(err) - } - if v.Location() != time.UTC { - t.Fatal("Time should be UTC") - } -} diff --git a/util/util.go b/util/util.go deleted file mode 100644 index 0e9cab794..000000000 --- a/util/util.go +++ /dev/null @@ -1,159 +0,0 @@ -// Package util implements various utility functions used within ipfs -// that do not currently have a better place to live. -package util - -import ( - "errors" - "io" - "math/rand" - "os" - "path/filepath" - "runtime/debug" - "strings" - "time" - - ds "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore" - b58 "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" - mh "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - - "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/mitchellh/go-homedir" -) - -// Debug is a global flag for debugging. -var Debug bool - -// ErrNotImplemented signifies a function has not been implemented yet. -var ErrNotImplemented = errors.New("Error: not implemented yet.") - -// ErrTimeout implies that a timeout has been triggered -var ErrTimeout = errors.New("Error: Call timed out.") - -// ErrSeErrSearchIncomplete implies that a search type operation didnt -// find the expected node, but did find 'a' node. -var ErrSearchIncomplete = errors.New("Error: Search Incomplete.") - -// ErrNotFound is returned when a search fails to find anything -var ErrNotFound = ds.ErrNotFound - -// TildeExpansion expands a filename, which may begin with a tilde. -func TildeExpansion(filename string) (string, error) { - return homedir.Expand(filename) -} - -// ErrCast is returned when a cast fails AND the program should not panic. -func ErrCast() error { - debug.PrintStack() - return errCast -} - -var errCast = errors.New("cast error") - -// ExpandPathnames takes a set of paths and turns them into absolute paths -func ExpandPathnames(paths []string) ([]string, error) { - var out []string - for _, p := range paths { - abspath, err := filepath.Abs(p) - if err != nil { - return nil, err - } - out = append(out, abspath) - } - return out, nil -} - -type randGen struct { - rand.Rand -} - -func NewTimeSeededRand() io.Reader { - src := rand.NewSource(time.Now().UnixNano()) - return &randGen{ - Rand: *rand.New(src), - } -} - -func NewSeededRand(seed int64) io.Reader { - src := rand.NewSource(seed) - return &randGen{ - Rand: *rand.New(src), - } -} - -func (r *randGen) Read(p []byte) (n int, err error) { - for i := 0; i < len(p); i++ { - p[i] = byte(r.Rand.Intn(255)) - } - return len(p), nil -} - -// GetenvBool is the way to check an env var as a boolean -func GetenvBool(name string) bool { - v := strings.ToLower(os.Getenv(name)) - return v == "true" || v == "t" || v == "1" -} - -// MultiErr is a util to return multiple errors -type MultiErr []error - -func (m MultiErr) Error() string { - if len(m) == 0 { - return "no errors" - } - - s := "Multiple errors: " - for i, e := range m { - if i != 0 { - s += ", " - } - s += e.Error() - } - return s -} - -func Partition(subject string, sep string) (string, string, string) { - if i := strings.Index(subject, sep); i != -1 { - return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] - } - return subject, "", "" -} - -func RPartition(subject string, sep string) (string, string, string) { - if i := strings.LastIndex(subject, sep); i != -1 { - return subject[:i], subject[i : i+len(sep)], subject[i+len(sep):] - } - return subject, "", "" -} - -// Hash is the global IPFS hash function. uses multihash SHA2_256, 256 bits -func Hash(data []byte) mh.Multihash { - h, err := mh.Sum(data, mh.SHA2_256, -1) - if err != nil { - // this error can be safely ignored (panic) because multihash only fails - // from the selection of hash function. If the fn + length are valid, it - // won't error. - panic("multihash failed to hash using SHA2_256.") - } - return h -} - -// IsValidHash checks whether a given hash is valid (b58 decodable, len > 0) -func IsValidHash(s string) bool { - out := b58.Decode(s) - if out == nil || len(out) == 0 { - return false - } - _, err := mh.Cast(out) - if err != nil { - return false - } - return true -} - -// XOR takes two byte slices, XORs them together, returns the resulting slice. -func XOR(a, b []byte) []byte { - c := make([]byte, len(a)) - for i := 0; i < len(a); i++ { - c[i] = a[i] ^ b[i] - } - return c -} diff --git a/util/util_test.go b/util/util_test.go deleted file mode 100644 index 70747ad90..000000000 --- a/util/util_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package util - -import ( - "bytes" - "testing" -) - -func TestXOR(t *testing.T) { - cases := [][3][]byte{ - { - {0xFF, 0xFF, 0xFF}, - {0xFF, 0xFF, 0xFF}, - {0x00, 0x00, 0x00}, - }, - { - {0x00, 0xFF, 0x00}, - {0xFF, 0xFF, 0xFF}, - {0xFF, 0x00, 0xFF}, - }, - { - {0x55, 0x55, 0x55}, - {0x55, 0xFF, 0xAA}, - {0x00, 0xAA, 0xFF}, - }, - } - - for _, c := range cases { - r := XOR(c[0], c[1]) - if !bytes.Equal(r, c[2]) { - t.Error("XOR failed") - } - } -} - -func BenchmarkHash256K(b *testing.B) { - buf := make([]byte, 256*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(256 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -} - -func BenchmarkHash512K(b *testing.B) { - buf := make([]byte, 512*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(512 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -} - -func BenchmarkHash1M(b *testing.B) { - buf := make([]byte, 1024*1024) - NewTimeSeededRand().Read(buf) - b.SetBytes(int64(1024 * 1024)) - b.ResetTimer() - for i := 0; i < b.N; i++ { - Hash(buf) - } -}