From d1dfaa54ea1bd8b58c3a7afd4e4a20f8080b32e6 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 8 Jun 2019 23:59:34 +0800 Subject: [PATCH] test --- def.go | 2 +- msg.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/def.go b/def.go index 664bda4..a253ff0 100644 --- a/def.go +++ b/def.go @@ -9,7 +9,7 @@ import ( ) type DataBackup struct { - Messages []*ChatWarsMessage `json:"messages"` + Messages []ChatWarsMessage `json:"messages"` } type MQKeepAlive struct { diff --git a/msg.go b/msg.go index 752ce4e..f7dbda8 100644 --- a/msg.go +++ b/msg.go @@ -275,13 +275,13 @@ func parseSubTypeMessagePillageInc(m *ChatWarsMessage, r *regexp.Regexp) (*ChatW func zipMessages() ([]byte, error) { bkp := DataBackup{} - msgs := new([]*ChatWarsMessage) + msgs := new([]ChatWarsMessage) ids := getSQLListID64(`SELECT om.obj_id id FROM obj_msg om;`) for _, id := range ids { m, err := getMsg(id) logOnError(err, "zipMessages : getMsg") if err == nil { - append(*msgs, m) + append(*msgs, *m) } } bkp.Messages = *msgs