examples/interact.go
changeset 77 edda99a69002
parent 76 caa722ab8a0f
child 78 a5848c75d270
equal deleted inserted replaced
76:caa722ab8a0f 77:edda99a69002
    14 )
    14 )
    15 
    15 
    16 // Demonstrate the API, and allow the user to interact with an XMPP
    16 // Demonstrate the API, and allow the user to interact with an XMPP
    17 // server via the terminal.
    17 // server via the terminal.
    18 func main() {
    18 func main() {
    19 	if false {
    19 	xmpp.Log = log.New(os.Stderr, "", 0)
    20 		xmpp.Loglevel = syslog.LOG_DEBUG
    20 	xmpp.Loglevel = syslog.LOG_NOTICE
    21 		xmpp.Log = log.New(os.Stderr, "", 0)
       
    22 	}
       
    23 
    21 
    24 	var jid xmpp.JID
    22 	var jid xmpp.JID
    25 	flag.Var(&jid, "jid", "JID to log in as")
    23 	flag.Var(&jid, "jid", "JID to log in as")
    26 	var pw *string = flag.String("pw", "", "password")
    24 	var pw *string = flag.String("pw", "", "password")
    27 	flag.Parse()
    25 	flag.Parse()