mirror of
https://github.com/gissleh/irc.git
synced 2026-10-29 11:32:54 +00:00
11 lines
271 B
Go
11 lines
271 B
Go
package irc
|
|
|
|
// NewErrorEvent makes an event of kind `error` and verb `code` with the text.
|
|
// It's absolutely trivial, but it's good to have standarized.
|
|
func NewErrorEvent(code, text string) Event {
|
|
event := NewEvent("error", code)
|
|
event.Text = text
|
|
|
|
return event
|
|
}
|