source: code/trunk/vendor/gopkg.in/irc.v3/handler.go@ 822

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
RevLine 
[822]1package irc
2
3// Handler is a simple interface meant for dispatching a message from
4// a Client connection.
5type 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.
11type HandlerFunc func(*Client, *Message)
12
13// Handle calls f(c, m)
14func (f HandlerFunc) Handle(c *Client, m *Message) {
15 f(c, m)
16}
Note: See TracBrowser for help on using the repository browser.