test
This commit is contained in:
parent
a4268584c2
commit
f03577ec79
11
msg.go
11
msg.go
@ -333,6 +333,17 @@ func UnzipMessages(z []byte) error {
|
||||
}
|
||||
|
||||
for _, f := range zr.File {
|
||||
if strings.Compare(f.Name, "backup.json") == 0 {
|
||||
rc, err := f.Open()
|
||||
logOnError(err, "UnzipMessages : Open")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
bkp := DataBackup{}
|
||||
err = json.NewDecoder(rc).Decode(bkp)
|
||||
rc.Close()
|
||||
log.Printf("UnzipMessages : %d messages.\n", len(bkp.Messages))
|
||||
}
|
||||
log.Printf("File : %s\n", f.Name)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user