mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-27 21:02:02 -08:00
Better style
This commit is contained in:
parent
07b0d2d14d
commit
a43518b976
@ -21,14 +21,13 @@ func main() {
|
|||||||
Insecure: true,
|
Insecure: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
var client *xmpp.Client
|
client, err := xmpp.NewClient(options)
|
||||||
var err error
|
if err != nil {
|
||||||
if client, err = xmpp.NewClient(options); err != nil {
|
|
||||||
log.Fatal("Error: ", err)
|
log.Fatal("Error: ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
var session *xmpp.Session
|
session, err := client.Connect()
|
||||||
if session, err = client.Connect(); err != nil {
|
if err != nil {
|
||||||
log.Fatal("Error: ", err)
|
log.Fatal("Error: ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user