Merge pull request #22 from specode/master

fix example
This commit is contained in:
mattn 2013-10-20 20:41:32 -07:00
commit 73e63850ab
2 changed files with 7 additions and 6 deletions

View File

@ -1,8 +1,8 @@
package main
import (
"github.com/mattn/go-xmpp"
"github.com/mattn/go-gtk/gtk"
"github.com/mattn/go-xmpp"
"log"
"os"
"strings"
@ -67,7 +67,7 @@ func main() {
os.Exit(0)
}
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_)
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_, false)
if err != nil {
log.Fatal(err)
}

View File

@ -2,8 +2,8 @@ package main
import (
"bufio"
"fmt"
"flag"
"fmt"
"github.com/mattn/go-xmpp"
"log"
"os"
@ -14,6 +14,7 @@ var server = flag.String("server", "talk.google.com:443", "server")
var username = flag.String("username", "", "username")
var password = flag.String("password", "", "password")
var notls = flag.Bool("notls", false, "No TLS")
var debug = flag.Bool("debug", false, "debug output")
func main() {
flag.Usage = func() {
@ -29,9 +30,9 @@ func main() {
var talk *xmpp.Client
var err error
if *notls {
talk, err = xmpp.NewClientNoTLS(*server, *username, *password)
talk, err = xmpp.NewClientNoTLS(*server, *username, *password, *debug)
} else {
talk, err = xmpp.NewClient(*server, *username, *password)
talk, err = xmpp.NewClient(*server, *username, *password, *debug)
}
if err != nil {
log.Fatal(err)