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