summaryrefslogtreecommitdiffstats
path: root/model/team_stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/team_stats.go')
-rw-r--r--model/team_stats.go19
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
}