diff options
Diffstat (limited to 'model/channel_count.go')
-rw-r--r-- | model/channel_count.go | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/model/channel_count.go b/model/channel_count.go index aecb0c712..8c6d8dd0e 100644 --- a/model/channel_count.go +++ b/model/channel_count.go @@ -43,21 +43,12 @@ func (o *ChannelCounts) Etag() string { } func (o *ChannelCounts) ToJson() string { - b, err := json.Marshal(o) - if err != nil { - return "" - } else { - return string(b) - } + b, _ := json.Marshal(o) + return string(b) } func ChannelCountsFromJson(data io.Reader) *ChannelCounts { - decoder := json.NewDecoder(data) - var o ChannelCounts - err := decoder.Decode(&o) - if err == nil { - return &o - } else { - return nil - } + var o *ChannelCounts + json.NewDecoder(data).Decode(&o) + return o } |