From a43518b9761432c9e336f464be76af0f38036cac Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Sun, 23 Sep 2018 18:40:13 +0200 Subject: [PATCH] Better style --- cmd/xmpp_echo/xmpp_echo.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/xmpp_echo/xmpp_echo.go b/cmd/xmpp_echo/xmpp_echo.go index 6ebda72..c6e4486 100644 --- a/cmd/xmpp_echo/xmpp_echo.go +++ b/cmd/xmpp_echo/xmpp_echo.go @@ -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) }