(errText string)
| 473 | } |
| 474 | |
| 475 | func (h *SSEHandlerCh) AiMsgError(errText string) error { |
| 476 | resp := map[string]interface{}{ |
| 477 | "type": AiMsgError, |
| 478 | "errorText": errText, |
| 479 | } |
| 480 | return h.WriteJsonData(resp) |
| 481 | } |
| 482 | |
| 483 | func (h *SSEHandlerCh) AiMsgData(dataType string, id string, data interface{}) error { |
| 484 | if !strings.HasPrefix(dataType, "data-") { |
no test coverage detected