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