Allow nil conversion handlers in btcctl.
This commit is contained in:
parent
2ea4239f5e
commit
4e5cd1a326
1 changed files with 8 additions and 6 deletions
|
@ -159,6 +159,7 @@ func commandHandler(cfg *config, command string, data *handlerData, args []strin
|
||||||
iargs[i] = arg
|
iargs[i] = arg
|
||||||
}
|
}
|
||||||
for i := range iargs {
|
for i := range iargs {
|
||||||
|
if convHandlers != nil {
|
||||||
converter := convHandlers[i]
|
converter := convHandlers[i]
|
||||||
if converter != nil {
|
if converter != nil {
|
||||||
convertedArg, err := converter(args[i])
|
convertedArg, err := converter(args[i])
|
||||||
|
@ -168,6 +169,7 @@ func commandHandler(cfg *config, command string, data *handlerData, args []strin
|
||||||
iargs[i] = convertedArg
|
iargs[i] = convertedArg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create and send the appropriate JSON-RPC command.
|
// Create and send the appropriate JSON-RPC command.
|
||||||
reply, err := sendCommand(cfg, command, iargs...)
|
reply, err := sendCommand(cfg, command, iargs...)
|
||||||
|
|
Loading…
Reference in a new issue