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