diff --git a/example/example-gui.go b/example/example-gui.go index f29bdf0..0787cfc 100644 --- a/example/example-gui.go +++ b/example/example-gui.go @@ -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) } diff --git a/example/example.go b/example/example.go index 5702a74..f69099f 100644 --- a/example/example.go +++ b/example/example.go @@ -2,18 +2,19 @@ package main import ( "bufio" - "fmt" "flag" + "fmt" "github.com/mattn/go-xmpp" "log" "os" "strings" ) -var server = flag.String("server", "talk.google.com:443", "server") +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)