Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
1c53aea2
提交
1c53aea2
authored
12月 02, 2015
作者:
Juan Benet
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2000 from nham/object_put_newline
Add newline to end of `ipfs object put` text output.
上级
c8e48456
d49a15f5
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
15 行增加
和
15 行删除
+15
-15
ipns.go
core/commands/ipns.go
+1
-1
object.go
core/commands/object.go
+1
-1
resolve.go
core/commands/resolve.go
+1
-1
tar.go
core/commands/tar.go
+1
-1
t0051-object.sh
test/sharness/t0051-object.sh
+6
-6
t0100-name.sh
test/sharness/t0100-name.sh
+2
-2
t0160-resolve.sh
test/sharness/t0160-resolve.sh
+2
-2
t0240-republisher.sh
test/sharness/t0240-republisher.sh
+1
-1
没有找到文件。
core/commands/ipns.go
浏览文件 @
1c53aea2
...
...
@@ -121,7 +121,7 @@ Resolve the value of another name:
if
!
ok
{
return
nil
,
u
.
ErrCast
()
}
return
strings
.
NewReader
(
output
.
Path
.
String
()),
nil
return
strings
.
NewReader
(
output
.
Path
.
String
()
+
"
\n
"
),
nil
},
},
Type
:
ResolvedPath
{},
...
...
core/commands/object.go
浏览文件 @
1c53aea2
...
...
@@ -371,7 +371,7 @@ and then run
Marshalers
:
cmds
.
MarshalerMap
{
cmds
.
Text
:
func
(
res
cmds
.
Response
)
(
io
.
Reader
,
error
)
{
object
:=
res
.
Output
()
.
(
*
Object
)
return
strings
.
NewReader
(
"added "
+
object
.
Hash
),
nil
return
strings
.
NewReader
(
"added "
+
object
.
Hash
+
"
\n
"
),
nil
},
},
Type
:
Object
{},
...
...
core/commands/resolve.go
浏览文件 @
1c53aea2
...
...
@@ -117,7 +117,7 @@ Resolve the value of an IPFS DAG path:
if
!
ok
{
return
nil
,
u
.
ErrCast
()
}
return
strings
.
NewReader
(
output
.
Path
.
String
()),
nil
return
strings
.
NewReader
(
output
.
Path
.
String
()
+
"
\n
"
),
nil
},
},
Type
:
ResolvedPath
{},
...
...
core/commands/tar.go
浏览文件 @
1c53aea2
...
...
@@ -67,7 +67,7 @@ var tarAddCmd = &cmds.Command{
Marshalers
:
cmds
.
MarshalerMap
{
cmds
.
Text
:
func
(
res
cmds
.
Response
)
(
io
.
Reader
,
error
)
{
o
:=
res
.
Output
()
.
(
*
AddedObject
)
return
strings
.
NewReader
(
o
.
Hash
),
nil
return
strings
.
NewReader
(
o
.
Hash
+
"
\n
"
),
nil
},
},
}
...
...
test/sharness/t0051-object.sh
浏览文件 @
1c53aea2
...
...
@@ -66,7 +66,7 @@ test_object_cmd() {
test_expect_success
"'ipfs object put file.json' output looks good"
'
HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
printf "added $HASH" > expected_putOut &&
printf "added $HASH
\n
" > expected_putOut &&
test_cmp expected_putOut actual_putOut
'
...
...
@@ -76,7 +76,7 @@ test_object_cmd() {
test_expect_success
"'ipfs object put file.xml' output looks good"
'
HASH="QmQzNKUHy4HyEUGkqKe3q3t796ffPLQXYCkHCcXUNT5JNK" &&
printf "added $HASH" > expected_putOut &&
printf "added $HASH
\n
" > expected_putOut &&
test_cmp expected_putOut actual_putOut
'
...
...
@@ -103,7 +103,7 @@ test_object_cmd() {
'
test_expect_failure
"'ipfs object put --inputenc=xml' output looks good"
'
echo "added $HASH" >expected &&
echo "added $HASH
\n
" >expected &&
test_cmp expected actual
'
...
...
@@ -113,7 +113,7 @@ test_object_cmd() {
test_expect_success
"'ipfs object put file.pb' output looks good"
'
HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
printf "added $HASH" > expected_putOut &&
printf "added $HASH
\n
" > expected_putOut &&
test_cmp expected_putOut actual_putOut
'
...
...
@@ -123,7 +123,7 @@ test_object_cmd() {
test_expect_success
"'ipfs object put' from stdin output looks good"
'
HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
printf "added $HASH" > expected_putStdinOut &&
printf "added $HASH
\n
" > expected_putStdinOut &&
test_cmp expected_putStdinOut actual_putStdinOut
'
...
...
@@ -133,7 +133,7 @@ test_object_cmd() {
test_expect_success
"'ipfs object put' from stdin (pb) output looks good"
'
HASH="QmUTSAdDi2xsNkDtLqjFgQDMEn5di3Ab9eqbrt4gaiNbUD" &&
printf "added $HASH" > expected_putStdinOut &&
printf "added $HASH
\n
" > expected_putStdinOut &&
test_cmp expected_putStdinOut actual_putPbStdinOut
'
...
...
test/sharness/t0100-name.sh
浏览文件 @
1c53aea2
...
...
@@ -28,7 +28,7 @@ test_expect_success "'ipfs name resolve' succeeds" '
'
test_expect_success
"resolve output looks good"
'
printf "/ipfs/%s" "$HASH_WELCOME_DOCS" >expected2 &&
printf "/ipfs/%s
\n
" "$HASH_WELCOME_DOCS" >expected2 &&
test_cmp expected2 output
'
...
...
@@ -50,7 +50,7 @@ test_expect_success "'ipfs name resolve' succeeds" '
'
test_expect_success
"resolve output looks good"
'
printf "/ipfs/%s/help" "$HASH_WELCOME_DOCS" >expected4 &&
printf "/ipfs/%s/help
\n
" "$HASH_WELCOME_DOCS" >expected4 &&
test_cmp expected4 output
'
...
...
test/sharness/t0160-resolve.sh
浏览文件 @
1c53aea2
...
...
@@ -20,7 +20,7 @@ test_resolve_setup_name() {
test_expect_success
"resolve: prepare name"
'
id_hash=$(ipfs id -f="<id>") &&
ipfs name publish "$ref" &&
printf "$ref" >expected_nameval &&
printf "$ref
\n
" >expected_nameval &&
ipfs name resolve >actual_nameval &&
test_cmp expected_nameval actual_nameval
'
...
...
@@ -47,7 +47,7 @@ test_resolve() {
'
test_expect_success
"resolved correctly:
$src
->
$dst
"
'
printf "$dst" >expected &&
printf "$dst
\n
" >expected &&
test_cmp expected actual
'
}
...
...
test/sharness/t0240-republisher.sh
浏览文件 @
1c53aea2
...
...
@@ -64,7 +64,7 @@ verify_can_resolve() {
'
test_expect_success
"output looks right"
'
printf "/ipfs/$expected" > expected &&
printf "/ipfs/$expected
\n
" > expected &&
test_cmp expected resolve
'
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论