1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 00:39:31 +08:00
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
Jeromy
2016-07-08 15:49:34 -07:00
parent 1aeda7eb6e
commit 467eb8db00

View File

@ -211,6 +211,8 @@ func (r *request) haveVarArgsFromStdin() bool {
len(r.arguments) < len(r.cmd.Arguments)
}
// VarArgs can be used when you want string arguments as input
// and also want to be able to handle them in a streaming fashion
func (r *request) VarArgs(f func(string) error) error {
var i int
for i = 0; i < len(r.cmd.Arguments); i++ {