From 5e2f337d396b0f6fe228ad05ef2b0f71c6751ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20GRUCHALA?= Date: Sun, 2 Apr 2017 18:45:19 +0200 Subject: [PATCH] FIX(Tweets) Json output --- model/Tweet.go | 10 +++++----- model/User.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/model/Tweet.go b/model/Tweet.go index 0a5ad84..9ee4453 100644 --- a/model/Tweet.go +++ b/model/Tweet.go @@ -4,11 +4,11 @@ import "fmt" // Tweet define a tweet type Tweet struct { - ID int64 `json:id` - CreatedAt string `json:created_at` - User *User `json:user` - Text string `json:text` - RetweetCount int `json:retweet_count` + ID int64 `json:"id"` + CreatedAt string `json:"created_at"` + User *User `json:"user"` + Text string `json:"text"` + RetweetCount int `json:"retweet_count"` } // String stringify the Tweet struct diff --git a/model/User.go b/model/User.go index 7fdf6f0..404a967 100644 --- a/model/User.go +++ b/model/User.go @@ -4,7 +4,7 @@ import "fmt" // User define a user type User struct { - ScreenName string `json:screen_name` + ScreenName string `json:"screen_name"` } // String stringify the User struct