minor fixes

This commit is contained in:
Ethan Buchman
2017-11-15 22:03:20 +00:00
parent 104368bd84
commit af0db599b0
2 changed files with 3 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ func NewRPCErrorResponse(id string, code int, msg string, data string) RPCRespon
}
func (resp RPCResponse) String() string {
if resp.Error != nil {
if resp.Error == nil {
return fmt.Sprintf("[%s %v]", resp.ID, resp.Result)
} else {
return fmt.Sprintf("[%s %s]", resp.ID, resp.Error)