Last change
on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago |
Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.
Signed-off-by: Izuru Yakumo <yakumo.izuru@…>
|
File size:
389 bytes
|
Rev | Line | |
---|
[822] | 1 | package irc
|
---|
| 2 |
|
---|
| 3 | // Handler is a simple interface meant for dispatching a message from
|
---|
| 4 | // a Client connection.
|
---|
| 5 | type Handler interface {
|
---|
| 6 | Handle(*Client, *Message)
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | // HandlerFunc is a simple wrapper around a function which allows it
|
---|
| 10 | // to be used as a Handler.
|
---|
| 11 | type HandlerFunc func(*Client, *Message)
|
---|
| 12 |
|
---|
| 13 | // Handle calls f(c, m)
|
---|
| 14 | func (f HandlerFunc) Handle(c *Client, m *Message) {
|
---|
| 15 | f(c, m)
|
---|
| 16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.