feat(components): added comment to MessageComponentFromJSON

This commit is contained in:
nitroflap 2022-02-16 16:50:33 +03:00
parent fca422b28f
commit 0494cdf33c
No known key found for this signature in database
GPG key ID: 810F53DB0E0F81A8

View file

@ -51,6 +51,7 @@ func (umc *unmarshalableMessageComponent) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, umc.MessageComponent)
}
// MessageComponentFromJSON is a helper function for unmarshaling message components
func MessageComponentFromJSON(b []byte) (MessageComponent, error) {
var u unmarshalableMessageComponent
err := u.UnmarshalJSON(b)