mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 22:49:13 +08:00
rename coreio to coreunix
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
|||||||
cmds "github.com/jbenet/go-ipfs/commands"
|
cmds "github.com/jbenet/go-ipfs/commands"
|
||||||
core "github.com/jbenet/go-ipfs/core"
|
core "github.com/jbenet/go-ipfs/core"
|
||||||
corecmds "github.com/jbenet/go-ipfs/core/commands"
|
corecmds "github.com/jbenet/go-ipfs/core/commands"
|
||||||
core_io "github.com/jbenet/go-ipfs/core/io"
|
coreunix "github.com/jbenet/go-ipfs/core/coreunix"
|
||||||
ci "github.com/jbenet/go-ipfs/p2p/crypto"
|
ci "github.com/jbenet/go-ipfs/p2p/crypto"
|
||||||
peer "github.com/jbenet/go-ipfs/p2p/peer"
|
peer "github.com/jbenet/go-ipfs/p2p/peer"
|
||||||
repo "github.com/jbenet/go-ipfs/repo"
|
repo "github.com/jbenet/go-ipfs/repo"
|
||||||
@ -130,7 +130,7 @@ func addTheWelcomeFile(repoRoot string) error {
|
|||||||
|
|
||||||
// Set up default file
|
// Set up default file
|
||||||
reader := bytes.NewBufferString(welcomeMsg)
|
reader := bytes.NewBufferString(welcomeMsg)
|
||||||
k, err := core_io.Add(nd, reader)
|
k, err := coreunix.Add(nd, reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to write test file: %s", err)
|
return fmt.Errorf("failed to write test file: %s", err)
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
package core_io
|
package coreunix
|
||||||
|
|
||||||
// TODO rename package to something that doesn't conflict with io/ioutil.
|
|
||||||
// Pretty names are hard to find.
|
|
||||||
//
|
|
||||||
// Candidates:
|
|
||||||
//
|
|
||||||
// go-ipfs/core/unix
|
|
||||||
// go-ipfs/core/io
|
|
||||||
// go-ipfs/core/ioutil
|
|
||||||
// go-ipfs/core/coreio
|
|
||||||
// go-ipfs/core/coreunix
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
@ -1,15 +1,4 @@
|
|||||||
package core_io
|
package coreunix
|
||||||
|
|
||||||
// TODO rename package to something that doesn't conflict with io/ioutil.
|
|
||||||
// Pretty names are hard to find.
|
|
||||||
//
|
|
||||||
// Candidates:
|
|
||||||
//
|
|
||||||
// go-ipfs/core/unix
|
|
||||||
// go-ipfs/core/io
|
|
||||||
// go-ipfs/core/ioutil
|
|
||||||
// go-ipfs/core/coreio
|
|
||||||
// go-ipfs/core/coreunix
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
@ -12,7 +12,7 @@ import (
|
|||||||
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
|
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
|
||||||
random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random"
|
random "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-random"
|
||||||
"github.com/jbenet/go-ipfs/core"
|
"github.com/jbenet/go-ipfs/core"
|
||||||
core_io "github.com/jbenet/go-ipfs/core/io"
|
coreunix "github.com/jbenet/go-ipfs/core/coreunix"
|
||||||
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
|
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
|
||||||
"github.com/jbenet/go-ipfs/p2p/peer"
|
"github.com/jbenet/go-ipfs/p2p/peer"
|
||||||
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
||||||
@ -115,12 +115,12 @@ func DirectAddCat(data []byte, conf testutil.LatencyConfig) error {
|
|||||||
catter.Bootstrap(ctx, []peer.PeerInfo{adder.Peerstore.PeerInfo(adder.Identity)})
|
catter.Bootstrap(ctx, []peer.PeerInfo{adder.Peerstore.PeerInfo(adder.Identity)})
|
||||||
adder.Bootstrap(ctx, []peer.PeerInfo{catter.Peerstore.PeerInfo(catter.Identity)})
|
adder.Bootstrap(ctx, []peer.PeerInfo{catter.Peerstore.PeerInfo(catter.Identity)})
|
||||||
|
|
||||||
keyAdded, err := core_io.Add(adder, bytes.NewReader(data))
|
keyAdded, err := coreunix.Add(adder, bytes.NewReader(data))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
readerCatted, err := core_io.Cat(catter, keyAdded)
|
readerCatted, err := coreunix.Cat(catter, keyAdded)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
|
context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
|
||||||
core "github.com/jbenet/go-ipfs/core"
|
core "github.com/jbenet/go-ipfs/core"
|
||||||
core_io "github.com/jbenet/go-ipfs/core/io"
|
coreunix "github.com/jbenet/go-ipfs/core/coreunix"
|
||||||
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
|
mocknet "github.com/jbenet/go-ipfs/p2p/net/mock"
|
||||||
"github.com/jbenet/go-ipfs/p2p/peer"
|
"github.com/jbenet/go-ipfs/p2p/peer"
|
||||||
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
errors "github.com/jbenet/go-ipfs/util/debugerror"
|
||||||
@ -62,12 +62,12 @@ func RunThreeLeggedCat(data []byte, conf testutil.LatencyConfig) error {
|
|||||||
adder.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
|
adder.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
|
||||||
catter.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
|
catter.Bootstrap(ctx, []peer.PeerInfo{boostrapInfo})
|
||||||
|
|
||||||
keyAdded, err := core_io.Add(adder, bytes.NewReader(data))
|
keyAdded, err := coreunix.Add(adder, bytes.NewReader(data))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
readerCatted, err := core_io.Cat(catter, keyAdded)
|
readerCatted, err := coreunix.Cat(catter, keyAdded)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user