This commit is contained in:
Owain G. Ainsworth 2013-10-25 18:23:53 +01:00
parent b3b8b37855
commit fedafbdd49
2 changed files with 14 additions and 14 deletions

View file

@ -375,7 +375,7 @@ func (cmd *AddMultisigAddressCmd) UnmarshalJSON(b []byte) error {
return errors.New("second parameter keys must be an array") return errors.New("second parameter keys must be an array")
} }
keys := make([]string, len(ikeys)) keys := make([]string, len(ikeys))
for i, val := range(ikeys) { for i, val := range ikeys {
keys[i], ok = val.(string) keys[i], ok = val.(string)
if !ok { if !ok {
return errors.New("second parameter keys must be an array of strings") return errors.New("second parameter keys must be an array of strings")
@ -618,7 +618,7 @@ func (cmd *CreateMultisigCmd) UnmarshalJSON(b []byte) error {
return errors.New("second parameter keys must be an array") return errors.New("second parameter keys must be an array")
} }
keys := make([]string, len(ikeys)) keys := make([]string, len(ikeys))
for i, val := range(ikeys) { for i, val := range ikeys {
keys[i], ok = val.(string) keys[i], ok = val.(string)
if !ok { if !ok {
return errors.New("second parameter keys must be an array of strings") return errors.New("second parameter keys must be an array of strings")

View file

@ -131,7 +131,7 @@ var jsoncmdtests = []struct {
"thisisahexidecimaltransaction") "thisisahexidecimaltransaction")
}, },
result: &DecodeRawTransactionCmd{ result: &DecodeRawTransactionCmd{
id: float64(1), id: float64(1),
HexTx: "thisisahexidecimaltransaction", HexTx: "thisisahexidecimaltransaction",
}, },
}, },
@ -142,7 +142,7 @@ var jsoncmdtests = []struct {
"address") "address")
}, },
result: &DumpPrivKeyCmd{ result: &DumpPrivKeyCmd{
id: float64(1), id: float64(1),
Address: "address", Address: "address",
}, },
}, },
@ -153,7 +153,7 @@ var jsoncmdtests = []struct {
"filename") "filename")
}, },
result: &DumpWalletCmd{ result: &DumpWalletCmd{
id: float64(1), id: float64(1),
Filename: "filename", Filename: "filename",
}, },
}, },
@ -164,7 +164,7 @@ var jsoncmdtests = []struct {
"passphrase") "passphrase")
}, },
result: &EncryptWalletCmd{ result: &EncryptWalletCmd{
id: float64(1), id: float64(1),
Passphrase: "passphrase", Passphrase: "passphrase",
}, },
}, },
@ -175,7 +175,7 @@ var jsoncmdtests = []struct {
"address") "address")
}, },
result: &GetAccountCmd{ result: &GetAccountCmd{
id: float64(1), id: float64(1),
Address: "address", Address: "address",
}, },
}, },
@ -186,7 +186,7 @@ var jsoncmdtests = []struct {
"account") "account")
}, },
result: &GetAccountAddressCmd{ result: &GetAccountAddressCmd{
id: float64(1), id: float64(1),
Account: "account", Account: "account",
}, },
}, },
@ -196,7 +196,7 @@ var jsoncmdtests = []struct {
return NewGetAddedNodeInfoCmd(float64(1), true) return NewGetAddedNodeInfoCmd(float64(1), true)
}, },
result: &GetAddedNodeInfoCmd{ result: &GetAddedNodeInfoCmd{
id: float64(1), id: float64(1),
Dns: true, Dns: true,
}, },
}, },
@ -206,7 +206,7 @@ var jsoncmdtests = []struct {
return NewGetAddedNodeInfoCmd(float64(1), false) return NewGetAddedNodeInfoCmd(float64(1), false)
}, },
result: &GetAddedNodeInfoCmd{ result: &GetAddedNodeInfoCmd{
id: float64(1), id: float64(1),
Dns: false, Dns: false,
}, },
}, },
@ -217,8 +217,8 @@ var jsoncmdtests = []struct {
"thisisanode") "thisisanode")
}, },
result: &GetAddedNodeInfoCmd{ result: &GetAddedNodeInfoCmd{
id: float64(1), id: float64(1),
Dns: true, Dns: true,
Node: "thisisanode", Node: "thisisanode",
}, },
}, },