From 7a1a05d69536b97095dace9c5b7b81328fd958b0 Mon Sep 17 00:00:00 2001 From: "John C. Vernaleo" Date: Mon, 15 Jul 2013 10:51:58 -0400 Subject: [PATCH] Clarify comment and add command to concrete type list. --- jsonapi.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jsonapi.go b/jsonapi.go index aef9321f..abccdc03 100644 --- a/jsonapi.go +++ b/jsonapi.go @@ -673,11 +673,12 @@ func readResultCmd(cmd string, message []byte) (Reply, error) { return result, err } result.Result = res - // For commands that return a single item, we get it with the - // correct concrete type for free (but treat them separately + // For commands that return a single item (or no items), we get it with + // the correct concrete type for free (but treat them separately // for clarity). case "getblockcount", "getbalance", "getblocknumber", "getgenerate", - "getconnetioncount", "getdifficulty", "gethashespersec": + "getconnetioncount", "getdifficulty", "gethashespersec", + "setgenerate": err = json.Unmarshal(message, &result) if err != nil { err = fmt.Errorf("Error unmarshalling json reply: %v", err)