diff options
author | George Goldberg <george@gberg.me> | 2018-02-06 17:25:53 +0000 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-02-06 17:25:53 +0000 |
commit | 7941c30117efe1b957ac0458c2f0479e3824196d (patch) | |
tree | df791632a9dc790a6f73dec53aae3ba919ebda63 /model/team_stats.go | |
parent | e1cd64613591cf5a990442a69ebf188258bd0cb5 (diff) | |
parent | 034dbc07e3068c482e654b6a1a8fcbe4b01c44f3 (diff) | |
download | chat-7941c30117efe1b957ac0458c2f0479e3824196d.tar.gz chat-7941c30117efe1b957ac0458c2f0479e3824196d.tar.bz2 chat-7941c30117efe1b957ac0458c2f0479e3824196d.zip |
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'model/team_stats.go')
-rw-r--r-- | model/team_stats.go | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/model/team_stats.go b/model/team_stats.go index e94ed37bc..0d688b806 100644 --- a/model/team_stats.go +++ b/model/team_stats.go @@ -15,21 +15,12 @@ type TeamStats struct { } func (o *TeamStats) ToJson() string { - b, err := json.Marshal(o) - if err != nil { - return "" - } else { - return string(b) - } + b, _ := json.Marshal(o) + return string(b) } func TeamStatsFromJson(data io.Reader) *TeamStats { - decoder := json.NewDecoder(data) - var o TeamStats - err := decoder.Decode(&o) - if err == nil { - return &o - } else { - return nil - } + var o *TeamStats + json.NewDecoder(data).Decode(&o) + return o } |