don't use type assertion

This commit is contained in:
filifa 2024-07-13 23:17:54 -05:00
parent 1fe8fbf827
commit e973c51abc
1 changed files with 2 additions and 2 deletions

View File

@ -51,14 +51,14 @@ func getGamePk() string {
func extractPatches(diffPatch []byte) ([]jsonpatch.Patch, error) {
var patches []jsonpatch.Patch
var objs []any
var objs []map[string]any
err := json.Unmarshal(diffPatch, &objs)
if err != nil {
return patches, err
}
for _, obj := range objs {
diff := obj.(map[string]any)["diff"]
diff := obj["diff"]
patch, err := json.Marshal(diff)
if err != nil {
return patches, err