summaryrefslogtreecommitdiffstats
path: root/model/initial_load.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/initial_load.go')
-rw-r--r--model/initial_load.go19
1 files changed, 5 insertions, 14 deletions
diff --git a/model/initial_load.go b/model/initial_load.go
index 71ba17696..3be680446 100644
--- a/model/initial_load.go
+++ b/model/initial_load.go
@@ -19,21 +19,12 @@ type InitialLoad struct {
}
func (me *InitialLoad) ToJson() string {
- b, err := json.Marshal(me)
- if err != nil {
- return ""
- } else {
- return string(b)
- }
+ b, _ := json.Marshal(me)
+ return string(b)
}
func InitialLoadFromJson(data io.Reader) *InitialLoad {
- decoder := json.NewDecoder(data)
- var o InitialLoad
- err := decoder.Decode(&o)
- if err == nil {
- return &o
- } else {
- return nil
- }
+ var o *InitialLoad
+ json.NewDecoder(data).Decode(&o)
+ return o
}