Allow nil conversion handlers in btcctl.

This commit is contained in:
Dave Collins 2013-10-21 23:03:11 -05:00
parent 2ea4239f5e
commit 4e5cd1a326

View file

@ -159,6 +159,7 @@ func commandHandler(cfg *config, command string, data *handlerData, args []strin
iargs[i] = arg
}
for i := range iargs {
if convHandlers != nil {
converter := convHandlers[i]
if converter != nil {
convertedArg, err := converter(args[i])
@ -168,6 +169,7 @@ func commandHandler(cfg *config, command string, data *handlerData, args []strin
iargs[i] = convertedArg
}
}
}
// Create and send the appropriate JSON-RPC command.
reply, err := sendCommand(cfg, command, iargs...)