From 0c8968fb8df4ce302c928118cd81e75f5bef2861 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 30 Jan 2018 17:23:00 -0600 Subject: unnamed return (#8170) --- model/post_list.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'model/post_list.go') diff --git a/model/post_list.go b/model/post_list.go index 09cddfdcf..27c22e7bd 100644 --- a/model/post_list.go +++ b/model/post_list.go @@ -132,12 +132,7 @@ func (o *PostList) IsChannelId(channelId string) bool { } func PostListFromJson(data io.Reader) *PostList { - decoder := json.NewDecoder(data) - var o PostList - err := decoder.Decode(&o) - if err == nil { - return &o - } else { - return nil - } + var o *PostList + json.NewDecoder(data).Decode(&o) + return o } -- cgit v1.2.3-1-g7c22