diff --git a/client.go b/client.go index 569a03bc..89820c05 100644 --- a/client.go +++ b/client.go @@ -43,7 +43,11 @@ func main() { } // try marshalling to tweet type var t Tweet - json.Unmarshal(searchresponse.Hits.Hits[0].Source, t) + bytes, err := searchresponse.Hits.Hits[0].Source.MarshalJSON() + if err != nil { + log.Fatalf("err calling marshalJson:%v", err) + } + json.Unmarshal(bytes, t) log.Printf("Search Found: %s", t) response, _ = core.Get("twitter", "tweet", "1", nil) log.Printf("Get: %v", response.Exists)