From 1606be22ff25a6955bd13034e32d019ffc748c5a Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 14 Sep 2016 22:34:26 +0100 Subject: [PATCH] Output db.Response instead of generc interface --- db/db.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/db.go b/db/db.go index 372b0ad2..bc69cc0c 100644 --- a/db/db.go +++ b/db/db.go @@ -32,10 +32,10 @@ import ( ) type Response struct { - Time string `json:"time,omitempty"` - Status interface{} `json:"status,omitempty"` - Detail interface{} `json:"detail,omitempty"` - Result interface{} `json:"result,omitempty"` + Time string `codec:"time,omitempty"` + Status interface{} `codec:"status,omitempty"` + Detail interface{} `codec:"detail,omitempty"` + Result interface{} `codec:"result,omitempty"` } var db *kvs.DB @@ -76,7 +76,7 @@ func Execute(ctx *fibre.Context, txt interface{}, vars map[string]interface{}) ( switch res := msg.(type) { case error: return nil, res - default: + case *Response: out = append(out, res) } }