MCPcopy
hub / github.com/mudler/LocalAGI / String

Method String

core/sse/sse.go:72–81  ·  view source on GitHub ↗

String returns the message as a string.

()

Source from the content-addressed store, hash-verified

70
71// String returns the message as a string.
72func (m *Message) String() string {
73 sb := strings.Builder{}
74
75 if m.Event != "" {
76 sb.WriteString(fmt.Sprintf("event: %s\n", m.Event))
77 }
78 sb.WriteString(fmt.Sprintf("data: %v\n\n", m.Data))
79
80 return sb.String()
81}
82
83// WithEvent sets the event name for the message.
84func (m *Message) WithEvent(event string) Envelope {

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected