1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

adder: make chan size a constant

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
This commit is contained in:
Kevin Atkinson
2017-03-05 22:58:18 -05:00
parent b7eae36f90
commit cf562403d2

View File

@ -40,6 +40,8 @@ const (
fstoreCacheOptionName = "fscache" fstoreCacheOptionName = "fscache"
) )
const adderOutChanSize = 8
var AddCmd = &cmds.Command{ var AddCmd = &cmds.Command{
Helptext: cmds.HelpText{ Helptext: cmds.HelpText{
Tagline: "Add a file or directory to ipfs.", 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 return
} }
outChan := make(chan interface{}, 8) outChan := make(chan interface{}, adderOutChanSize)
res.SetOutput((<-chan interface{})(outChan)) res.SetOutput((<-chan interface{})(outChan))
fileAdder.Out = outChan fileAdder.Out = outChan