Better style

This commit is contained in:
Mickael Remond 2018-09-23 18:40:13 +02:00
parent 07b0d2d14d
commit a43518b976
No known key found for this signature in database
GPG Key ID: E6F6045D79965AA3

View File

@ -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)
} }