Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
221652fc
提交
221652fc
authored
3月 22, 2018
作者:
Łukasz Magiera
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix govet warnings
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
上级
e77033cb
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
7 行增加
和
7 行删除
+7
-7
builder.go
core/builder.go
+2
-2
fsrefstore.go
filestore/fsrefstore.go
+1
-1
fsrepo.go
repo/fsrepo/fsrepo.go
+0
-1
main.go
test/dependencies/go-timeout/main.go
+2
-1
notifier.go
thirdparty/notifier/notifier.go
+2
-2
没有找到文件。
core/builder.go
浏览文件 @
221652fc
...
...
@@ -173,7 +173,7 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
// hash security
bs
:=
bstore
.
NewBlockstore
(
rds
)
bs
=
&
verifbs
.
VerifBS
{
bs
}
bs
=
&
verifbs
.
VerifBS
{
Blockstore
:
bs
}
opts
:=
bstore
.
DefaultCacheOpts
()
conf
,
err
:=
n
.
Repo
.
Config
()
...
...
@@ -202,7 +202,7 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
// hash security
n
.
Filestore
=
filestore
.
NewFilestore
(
bs
,
n
.
Repo
.
FileManager
())
n
.
Blockstore
=
bstore
.
NewGCBlockstore
(
n
.
Filestore
,
n
.
GCLocker
)
n
.
Blockstore
=
&
verifbs
.
VerifBSGC
{
n
.
Blockstore
}
n
.
Blockstore
=
&
verifbs
.
VerifBSGC
{
GCBlockstore
:
n
.
Blockstore
}
}
rcfg
,
err
:=
n
.
Repo
.
Config
()
...
...
filestore/fsrefstore.go
浏览文件 @
221652fc
...
...
@@ -77,7 +77,7 @@ func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error)
k
:=
ds
.
RawKey
(
v
.
Key
)
c
,
err
:=
dshelp
.
DsKeyToCid
(
k
)
if
err
!=
nil
{
log
.
Error
(
"decoding cid from filestore: %s"
,
err
)
log
.
Error
f
(
"decoding cid from filestore: %s"
,
err
)
continue
}
...
...
repo/fsrepo/fsrepo.go
浏览文件 @
221652fc
...
...
@@ -619,7 +619,6 @@ func (r *FSRepo) SetConfigKey(key string, value interface{}) error {
case
string
:
value
,
ok
=
value
.
(
string
)
default
:
value
=
value
}
if
!
ok
{
return
fmt
.
Errorf
(
"Wrong config type, expected %T"
,
oldValue
)
...
...
test/dependencies/go-timeout/main.go
浏览文件 @
221652fc
...
...
@@ -21,7 +21,8 @@ func main() {
fmt
.
Fprintf
(
os
.
Stderr
,
"Error: %v
\n
"
,
err
)
os
.
Exit
(
1
)
}
ctx
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Duration
(
timeout
)
*
time
.
Second
)
ctx
,
cancel
:=
context
.
WithTimeout
(
context
.
Background
(),
time
.
Duration
(
timeout
)
*
time
.
Second
)
defer
cancel
()
cmd
:=
exec
.
CommandContext
(
ctx
,
os
.
Args
[
2
],
os
.
Args
[
3
:
]
...
)
cmd
.
Stdin
=
os
.
Stdin
...
...
thirdparty/notifier/notifier.go
浏览文件 @
221652fc
...
...
@@ -40,8 +40,8 @@ type Notifier struct {
// RateLimited returns a rate limited Notifier. only limit goroutines
// will be spawned. If limit is zero, no rate limiting happens. This
// is the same as `Notifier{}`.
func
RateLimited
(
limit
int
)
Notifier
{
n
:=
Notifier
{}
func
RateLimited
(
limit
int
)
*
Notifier
{
n
:=
&
Notifier
{}
if
limit
>
0
{
n
.
lim
=
ratelimit
.
NewRateLimiter
(
process
.
Background
(),
limit
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论