fix append

This commit is contained in:
shoopea 2020-04-18 12:19:27 +08:00
parent 1f74136180
commit 2fd9aeb61e
2 changed files with 65 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@ -305,7 +305,9 @@ func loadObjItem() error {
}
objItemsBuf = make([]ChatWarsItem, 0)
err = json.Unmarshal(b, &objItemsBuf)
objItems = append(objItems, objItemsBuf)
for _, i := range objItemsBuf {
objItems = append(objItems, i)
}
log.Printf("%d items parsed from %s.\n", len(objItemsBuf), a)
}
}