Improve AddCallback documentation
This commit is contained in:
parent
5063e5f260
commit
6d6a4e3311
@ -8,8 +8,9 @@ import (
|
|||||||
|
|
||||||
// Register a callback to a connection and event code. A callback is a function
|
// Register a callback to a connection and event code. A callback is a function
|
||||||
// which takes only an Event pointer as parameter. Valid event codes are all
|
// which takes only an Event pointer as parameter. Valid event codes are all
|
||||||
// IRC/CTCP commands and error/response codes. This function returns the ID of
|
// IRC/CTCP commands and error/response codes. To register a callback for all
|
||||||
// the registered callback for later management.
|
// events pass "*" as the event code. This function returns the ID of the
|
||||||
|
// registered callback for later management.
|
||||||
func (irc *Connection) AddCallback(eventcode string, callback func(*Event)) int {
|
func (irc *Connection) AddCallback(eventcode string, callback func(*Event)) int {
|
||||||
eventcode = strings.ToUpper(eventcode)
|
eventcode = strings.ToUpper(eventcode)
|
||||||
id := 0
|
id := 0
|
||||||
|
Loading…
Reference in New Issue
Block a user