From eb740f5ebec8201afb4f553f292cd63d889a9db3 Mon Sep 17 00:00:00 2001 From: Teodor Maxim <57960185+tmaxmax@users.noreply.github.com> Date: Tue, 11 Jul 2023 23:27:46 +0300 Subject: [PATCH] Word AppendData documentation better. --- message.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/message.go b/message.go index 6c74d8d..f3535b2 100644 --- a/message.go +++ b/message.go @@ -89,7 +89,9 @@ func (e *Message) appendText(isComment bool, chunks ...string) { } } -// AppendData creates multiple data fields on the message's event from the given strings. +// AppendData adds multiple data fields on the message's event from the given strings. +// Each string will be a distinct data field, and if the strings themselves span multiple lines +// they will be broken into multiple fields. // // Server-sent events are not suited for binary data: the event fields are delimited by newlines, // where a newline can be a LF, CR or CRLF sequence. When the client interprets the fields,