From cf562403d2fc0672f83bd47ed85dc41db2814b66 Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Sun, 5 Mar 2017 22:58:18 -0500 Subject: [PATCH] adder: make chan size a constant License: MIT Signed-off-by: Kevin Atkinson --- core/commands/add.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/commands/add.go b/core/commands/add.go index ac655d621..2198dbee4 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -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