--- a/example/interact.go Wed Nov 06 20:40:50 2013 -0700
+++ b/example/interact.go Sat Nov 09 12:09:37 2013 -0700
@@ -18,11 +18,11 @@
// Demonstrate the API, and allow the user to interact with an XMPP
// server via the terminal.
func main() {
- var jid xmpp.JID
- flag.Var(&jid, "jid", "JID to log in as")
- var pw *string = flag.String("pw", "", "password")
+ jidStr := flag.String("jid", "", "JID to log in as")
+ pw := flag.String("pw", "", "password")
flag.Parse()
- if jid.Domain == "" || *pw == "" {
+ jid := xmpp.JID(*jidStr)
+ if jid.Domain() == "" || *pw == "" {
flag.Usage()
os.Exit(2)
}