equal
deleted
inserted
replaced
6 |
6 |
7 import ( |
7 import ( |
8 xmpp ".." |
8 xmpp ".." |
9 "flag" |
9 "flag" |
10 "fmt" |
10 "fmt" |
|
11 "io" |
11 "log" |
12 "log" |
12 "os" |
13 "os" |
13 ) |
14 ) |
|
15 |
|
16 func init() { |
|
17 r, w := io.Pipe() |
|
18 go io.Copy(os.Stdout, r) |
|
19 xmpp.Debug = log.New(w, "debug: ", 0) |
|
20 xmpp.Info = log.New(w, "info: ", 0) |
|
21 xmpp.Warn = log.New(w, "warn: ", 0) |
|
22 } |
14 |
23 |
15 // Demonstrate the API, and allow the user to interact with an XMPP |
24 // Demonstrate the API, and allow the user to interact with an XMPP |
16 // server via the terminal. |
25 // server via the terminal. |
17 func main() { |
26 func main() { |
18 var jid xmpp.JID |
27 var jid xmpp.JID |