Fix examples

This commit is contained in:
mattn
2014-09-17 12:35:47 +09:00
parent 748282a14a
commit f402673c8c
2 changed files with 19 additions and 1 deletions
+7 -1
View File
@@ -1,6 +1,7 @@
package main
import (
"crypto/tls"
"github.com/mattn/go-gtk/gtk"
"github.com/mattn/go-xmpp"
"log"
@@ -56,7 +57,7 @@ func main() {
dialog.AddButton(gtk.STOCK_OK, gtk.RESPONSE_OK)
dialog.AddButton(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
dialog.SetDefaultResponse(int(gtk.RESPONSE_OK))
dialog.SetDefaultResponse(gtk.RESPONSE_OK)
dialog.SetTransientFor(window)
dialog.ShowAll()
res := dialog.Run()
@@ -67,6 +68,11 @@ func main() {
os.Exit(0)
}
xmpp.DefaultConfig = tls.Config {
ServerName: "talk.google.com",
InsecureSkipVerify: false,
}
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_, false)
if err != nil {
log.Fatal(err)