1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00

simplifies composite literals

This commit is contained in:
Ink-33 2020-11-18 22:33:51 +08:00
parent 83e0aaa0f8
commit b2be595fb8
No known key found for this signature in database
GPG Key ID: 5D8B1D036EFB0D2E

View File

@ -184,12 +184,12 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M
} }
} }
case *message.GroupFlashImgElement: case *message.GroupFlashImgElement:
return []MSG{MSG{ return []MSG{{
"type": "image", "type": "image",
"data": map[string]string{"file": o.Filename, "type": "flash"}, "data": map[string]string{"file": o.Filename, "type": "flash"},
}} }}
case *message.FriendFlashImgElement: case *message.FriendFlashImgElement:
return []MSG{MSG{ return []MSG{{
"type": "image", "type": "image",
"data": map[string]string{"file": o.Filename, "type": "flash"}, "data": map[string]string{"file": o.Filename, "type": "flash"},
}} }}