本文整理匯總了Golang中api.Event.Channel方法的典型用法代碼示例。如果您正苦於以下問題:Golang Event.Channel方法的具體用法?Golang Event.Channel怎麽用?Golang Event.Channel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類api.Event
的用法示例。
在下文中一共展示了Event.Channel方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: newEventPART
func newEventPART(line string, user string, channel string) *api.Event {
event := new(api.Event)
event.Raw = line
event.Type = api.E_PART
event.Channel = channel
event.User = user
return event
}
示例2: newEventJOIN
func newEventJOIN(line string, user string, channel string) *api.Event {
event := new(api.Event)
event.Raw = line
event.Type = api.E_JOIN
event.Channel = channel
event.Data = channel
event.User = user
return event
}
示例3: newEventKICK
func newEventKICK(line string, user string, channel string, target string, msg string) *api.Event {
event := new(api.Event)
event.Raw = line
event.Type = api.E_KICK
event.Data = target
event.Channel = channel
event.User = user
return event
}
示例4: newEventPRIVMSG
func newEventPRIVMSG(line string, user string, channel string, msg string) *api.Event {
event := new(api.Event)
event.Raw = line
event.Type = api.E_PRIVMSG
event.Data = msg
if strings.Index(channel, "#") == 0 {
event.Channel = channel
}
event.User = user
return event
}