提交 cf562403 作者: Kevin Atkinson

adder: make chan size a constant

License: MIT
Signed-off-by: 's avatarKevin Atkinson <k@kevina.org>
上级 b7eae36f
......@@ -40,6 +40,8 @@ const (
fstoreCacheOptionName = "fscache"
)
const adderOutChanSize = 8
var AddCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Add a file or directory to ipfs.",
......@@ -208,7 +210,7 @@ You can now refer to the added file in a gateway, like so:
return
}
outChan := make(chan interface{}, 8)
outChan := make(chan interface{}, adderOutChanSize)
res.SetOutput((<-chan interface{})(outChan))
fileAdder.Out = outChan
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论