Просмотр исходного кода

feat(components): added comment to MessageComponentFromJSON

nitroflap 3 лет назад
Родитель
Сommit
0494cdf33c
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      components.go

+ 1 - 0
components.go

@@ -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)