Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
b0596cd4
提交
b0596cd4
authored
1月 16, 2015
作者:
Brian Tiger Chow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename coreio to coreunix
上级
a025fc9a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
10 行增加
和
32 行删除
+10
-32
init.go
cmd/ipfs/init.go
+2
-2
add.go
core/coreunix/add.go
+1
-12
cat.go
core/coreunix/cat.go
+1
-12
addcat_test.go
test/epictest/addcat_test.go
+3
-3
three_legged_cat_test.go
test/epictest/three_legged_cat_test.go
+3
-3
没有找到文件。
cmd/ipfs/init.go
浏览文件 @
b0596cd4
...
...
@@ -10,7 +10,7 @@ import (
cmds
"github.com/jbenet/go-ipfs/commands"
core
"github.com/jbenet/go-ipfs/core"
corecmds
"github.com/jbenet/go-ipfs/core/commands"
core
_io
"github.com/jbenet/go-ipfs/core/io
"
core
unix
"github.com/jbenet/go-ipfs/core/coreunix
"
ci
"github.com/jbenet/go-ipfs/p2p/crypto"
peer
"github.com/jbenet/go-ipfs/p2p/peer"
repo
"github.com/jbenet/go-ipfs/repo"
...
...
@@ -130,7 +130,7 @@ func addTheWelcomeFile(repoRoot string) error {
// Set up default file
reader
:=
bytes
.
NewBufferString
(
welcomeMsg
)
k
,
err
:=
core
_io
.
Add
(
nd
,
reader
)
k
,
err
:=
core
unix
.
Add
(
nd
,
reader
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to write test file: %s"
,
err
)
}
...
...
core/
io
/add.go
→
core/
coreunix
/add.go
浏览文件 @
b0596cd4
package
core_io
// 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
package
coreunix
import
(
"io"
...
...
core/
io
/cat.go
→
core/
coreunix
/cat.go
浏览文件 @
b0596cd4
package
core_io
// 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
package
coreunix
import
(
"io"
...
...
test/epictest/addcat_test.go
浏览文件 @
b0596cd4
...
...
@@ -12,7 +12,7 @@ import (
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"
"github.com/jbenet/go-ipfs/core"
core
_io
"github.com/jbenet/go-ipfs/core/io
"
core
unix
"github.com/jbenet/go-ipfs/core/coreunix
"
mocknet
"github.com/jbenet/go-ipfs/p2p/net/mock"
"github.com/jbenet/go-ipfs/p2p/peer"
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
)})
adder
.
Bootstrap
(
ctx
,
[]
peer
.
PeerInfo
{
catter
.
Peerstore
.
PeerInfo
(
catter
.
Identity
)})
keyAdded
,
err
:=
core
_io
.
Add
(
adder
,
bytes
.
NewReader
(
data
))
keyAdded
,
err
:=
core
unix
.
Add
(
adder
,
bytes
.
NewReader
(
data
))
if
err
!=
nil
{
return
err
}
readerCatted
,
err
:=
core
_io
.
Cat
(
catter
,
keyAdded
)
readerCatted
,
err
:=
core
unix
.
Cat
(
catter
,
keyAdded
)
if
err
!=
nil
{
return
err
}
...
...
test/epictest/three_legged_cat_test.go
浏览文件 @
b0596cd4
...
...
@@ -8,7 +8,7 @@ import (
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
core
"github.com/jbenet/go-ipfs/core"
core
_io
"github.com/jbenet/go-ipfs/core/io
"
core
unix
"github.com/jbenet/go-ipfs/core/coreunix
"
mocknet
"github.com/jbenet/go-ipfs/p2p/net/mock"
"github.com/jbenet/go-ipfs/p2p/peer"
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
})
catter
.
Bootstrap
(
ctx
,
[]
peer
.
PeerInfo
{
boostrapInfo
})
keyAdded
,
err
:=
core
_io
.
Add
(
adder
,
bytes
.
NewReader
(
data
))
keyAdded
,
err
:=
core
unix
.
Add
(
adder
,
bytes
.
NewReader
(
data
))
if
err
!=
nil
{
return
err
}
readerCatted
,
err
:=
core
_io
.
Cat
(
catter
,
keyAdded
)
readerCatted
,
err
:=
core
unix
.
Cat
(
catter
,
keyAdded
)
if
err
!=
nil
{
return
err
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论