go fmt
This commit is contained in:
parent
b3b8b37855
commit
fedafbdd49
2 changed files with 14 additions and 14 deletions
|
@ -375,7 +375,7 @@ func (cmd *AddMultisigAddressCmd) UnmarshalJSON(b []byte) error {
|
|||
return errors.New("second parameter keys must be an array")
|
||||
}
|
||||
keys := make([]string, len(ikeys))
|
||||
for i, val := range(ikeys) {
|
||||
for i, val := range ikeys {
|
||||
keys[i], ok = val.(string)
|
||||
if !ok {
|
||||
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")
|
||||
}
|
||||
keys := make([]string, len(ikeys))
|
||||
for i, val := range(ikeys) {
|
||||
for i, val := range ikeys {
|
||||
keys[i], ok = val.(string)
|
||||
if !ok {
|
||||
return errors.New("second parameter keys must be an array of strings")
|
||||
|
@ -712,7 +712,7 @@ func (cmd *CreateRawTransactionCmd) UnmarshalJSON(b []byte) error {
|
|||
if !ok {
|
||||
return errors.New("first parameter inputs must be an array of objects")
|
||||
}
|
||||
|
||||
|
||||
if len(v) != 2 {
|
||||
return errors.New("input with wrong number of members")
|
||||
}
|
||||
|
@ -1275,7 +1275,7 @@ func (cmd *GetAddedNodeInfoCmd) Method() string {
|
|||
// MarshalJSON returns the JSON encoding of cmd. Part of the Cmd interface.
|
||||
func (cmd *GetAddedNodeInfoCmd) MarshalJSON() ([]byte, error) {
|
||||
// Fill and marshal a RawCmd.
|
||||
|
||||
|
||||
raw := RawCmd{
|
||||
Jsonrpc: "1.0",
|
||||
Method: "getaddednodeinfo",
|
||||
|
|
|
@ -131,7 +131,7 @@ var jsoncmdtests = []struct {
|
|||
"thisisahexidecimaltransaction")
|
||||
},
|
||||
result: &DecodeRawTransactionCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
HexTx: "thisisahexidecimaltransaction",
|
||||
},
|
||||
},
|
||||
|
@ -142,7 +142,7 @@ var jsoncmdtests = []struct {
|
|||
"address")
|
||||
},
|
||||
result: &DumpPrivKeyCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Address: "address",
|
||||
},
|
||||
},
|
||||
|
@ -153,7 +153,7 @@ var jsoncmdtests = []struct {
|
|||
"filename")
|
||||
},
|
||||
result: &DumpWalletCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Filename: "filename",
|
||||
},
|
||||
},
|
||||
|
@ -164,7 +164,7 @@ var jsoncmdtests = []struct {
|
|||
"passphrase")
|
||||
},
|
||||
result: &EncryptWalletCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Passphrase: "passphrase",
|
||||
},
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ var jsoncmdtests = []struct {
|
|||
"address")
|
||||
},
|
||||
result: &GetAccountCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Address: "address",
|
||||
},
|
||||
},
|
||||
|
@ -186,7 +186,7 @@ var jsoncmdtests = []struct {
|
|||
"account")
|
||||
},
|
||||
result: &GetAccountAddressCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Account: "account",
|
||||
},
|
||||
},
|
||||
|
@ -196,7 +196,7 @@ var jsoncmdtests = []struct {
|
|||
return NewGetAddedNodeInfoCmd(float64(1), true)
|
||||
},
|
||||
result: &GetAddedNodeInfoCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Dns: true,
|
||||
},
|
||||
},
|
||||
|
@ -206,7 +206,7 @@ var jsoncmdtests = []struct {
|
|||
return NewGetAddedNodeInfoCmd(float64(1), false)
|
||||
},
|
||||
result: &GetAddedNodeInfoCmd{
|
||||
id: float64(1),
|
||||
id: float64(1),
|
||||
Dns: false,
|
||||
},
|
||||
},
|
||||
|
@ -217,8 +217,8 @@ var jsoncmdtests = []struct {
|
|||
"thisisanode")
|
||||
},
|
||||
result: &GetAddedNodeInfoCmd{
|
||||
id: float64(1),
|
||||
Dns: true,
|
||||
id: float64(1),
|
||||
Dns: true,
|
||||
Node: "thisisanode",
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue