Update examples

This commit is contained in:
Mickael Remond
2019-06-19 11:19:49 +02:00
committed by Mickaël Rémond
parent 24502f7cd7
commit 3f81465c6c
4 changed files with 85 additions and 91 deletions

View File

@@ -22,7 +22,7 @@ func main() {
}
router := xmpp.NewRouter()
router.HandleFunc("message", HandleMessage)
router.HandleFunc("message", handleMessage)
client, err := xmpp.NewClient(config, router)
if err != nil {
@@ -35,7 +35,7 @@ func main() {
log.Fatal(cm.Run())
}
func HandleMessage(s xmpp.Sender, p xmpp.Packet) {
func handleMessage(s xmpp.Sender, p xmpp.Packet) {
msg, ok := p.(xmpp.Message)
if !ok {
_, _ = fmt.Fprintf(os.Stdout, "Ignoring packet: %T\n", p)