1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-05-20 16:36:46 +08:00

commands: Changed Request#Arguments to a []string

This commit is contained in:
Matt Bell
2014-11-16 23:28:04 -08:00
parent 9dcf21673d
commit f8be26810a
4 changed files with 11 additions and 16 deletions

View File

@ -127,7 +127,7 @@ func parseOptions(input []string) (map[string]interface{}, []string, error) {
return opts, args, nil
}
func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursive bool) ([]interface{}, []cmds.File, error) {
func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursive bool) ([]string, []cmds.File, error) {
// check if stdin is coming from terminal or is being piped in
if stdin != nil {
stat, err := stdin.Stat()
@ -163,7 +163,7 @@ func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursi
return nil, nil, fmt.Errorf("Expected %v arguments, got %v", len(argDefs), numInputs)
}
stringArgs := make([]interface{}, 0, numInputs)
stringArgs := make([]string, 0, numInputs)
fileArgs := make([]cmds.File, 0, numInputs)
argDefIndex := 0 // the index of the current argument definition