rename coreio to coreunix
Brian Tiger Chow committed
Jan 16, 2015 at 18:04 UTC
b0596cd4ff0bca3b0b43a9f430d355e29f47acb3
5 files changed
+10
-32
cmd/ipfs/init.go
+2
-2
@@ -10,7 +10,7 @@ import (
10
cmds "github.com/jbenet/go-ipfs/commands"
11
core "github.com/jbenet/go-ipfs/core"
12
corecmds "github.com/jbenet/go-ipfs/core/commands"
13
- core_io "github.com/jbenet/go-ipfs/core/io"
13
+ coreunix "github.com/jbenet/go-ipfs/core/coreunix"
14
ci "github.com/jbenet/go-ipfs/p2p/crypto"
15
peer "github.com/jbenet/go-ipfs/p2p/peer"
16
repo "github.com/jbenet/go-ipfs/repo"
@@ -130,7 +130,7 @@ func addTheWelcomeFile(repoRoot string) error {
130
131
// Set up default file
132
reader := bytes.NewBufferString(welcomeMsg)
133
- k, err := core_io.Add(nd, reader)
133
+ k, err := coreunix.Add(nd, reader)
134
if err != nil {
135
return fmt.Errorf("failed to write test file: %s", err)
136
}
core/coreunix/add.go
renamed
+1
-12
@@ -1,15 +1,4 @@
1
-package core_io
2
-
3
-// TODO rename package to something that doesn't conflict with io/ioutil.
4
-// Pretty names are hard to find.
5
-//
6
-// Candidates:
7
-//
8
-// go-ipfs/core/unix
9
-// go-ipfs/core/io
10
-// go-ipfs/core/ioutil
11
-// go-ipfs/core/coreio
12
-// go-ipfs/core/coreunix
1
+package coreunix
2
3
import (
4
"io"
core/coreunix/cat.go
renamed
+1
-12
@@ -1,15 +1,4 @@
1
-package core_io
2
-
3
-// TODO rename package to something that doesn't conflict with io/ioutil.
4
-// Pretty names are hard to find.
5
-//
6
-// Candidates:
7
-//
8
-// go-ipfs/core/unix
9
-// go-ipfs/core/io
10
-// go-ipfs/core/ioutil
11
-// go-ipfs/core/coreio
12
-// go-ipfs/core/coreunix
1
+package coreunix
2
3
import (
4
"io"
test/epictest/addcat_test.go
+3
-3
@@ -12,7 +12,7 @@ import (
12
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
13
random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random"
14
"github.com/jbenet/go-ipfs/core"
15
- core_io "github.com/jbenet/go-ipfs/core/io"
15
+ coreunix "github.com/jbenet/go-ipfs/core/coreunix"
16
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
17
"github.com/jbenet/go-ipfs/p2p/peer"
18
errors "github.com/jbenet/go-ipfs/util/debugerror"
@@ -115,12 +115,12 @@ func DirectAddCat(data []byte, conf testutil.LatencyConfig) error {
115
catter.Bootstrap(ctx, []peer.PeerInfo{adder.Peerstore.PeerInfo(adder.Identity)})
116
adder.Bootstrap(ctx, []peer.PeerInfo{catter.Peerstore.PeerInfo(catter.Identity)})
117
118
- keyAdded, err := core_io.Add(adder, bytes.NewReader(data))
118
+ keyAdded, err := coreunix.Add(adder, bytes.NewReader(data))
119
if err != nil {
120
return err
121
}
122
123
- readerCatted, err := core_io.Cat(catter, keyAdded)
123
+ readerCatted, err := coreunix.Cat(catter, keyAdded)
124
if err != nil {
125
return err
126
}
test/epictest/three_legged_cat_test.go
+3
-3
@@ -8,7 +8,7 @@ import (
8
9
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
10
core "github.com/jbenet/go-ipfs/core"
11
- core_io "github.com/jbenet/go-ipfs/core/io"
11
+ coreunix "github.com/jbenet/go-ipfs/core/coreunix"
12
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
13
"github.com/jbenet/go-ipfs/p2p/peer"
14
errors "github.com/jbenet/go-ipfs/util/debugerror"
@@ -62,12 +62,12 @@ func RunThreeLeggedCat(data []byte, conf testutil.LatencyConfig) error {
62
adder.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
63
catter.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
64
65
- keyAdded, err := core_io.Add(adder, bytes.NewReader(data))
65
+ keyAdded, err := coreunix.Add(adder, bytes.NewReader(data))
66
if err != nil {
67
return err
68
}
69
70
- readerCatted, err := core_io.Cat(catter, keyAdded)
70
+ readerCatted, err := coreunix.Cat(catter, keyAdded)
71
if err != nil {
72
return err
73
}