From 8965adcdbc5ccf30afdccac31cc3a6f9d7451b91 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 27 Jun 2023 15:51:09 +0200 Subject: Apply go fmt --- xmpp/session.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'xmpp/session.go') diff --git a/xmpp/session.go b/xmpp/session.go index e928f01..9959c80 100644 --- a/xmpp/session.go +++ b/xmpp/session.go @@ -3,8 +3,8 @@ package xmpp import ( "crypto/tls" "crypto/x509" - "log" "encoding/xml" + "log" ) type SessionConnect struct{} @@ -37,7 +37,9 @@ func (s *session) run() { defer func() { s.out <- SessionDisconnect{} }() err := s.startTransport() - if err != nil { return } + if err != nil { + return + } defer s.transport.Close() s.ed = newEncoderDecoder(s) @@ -53,8 +55,10 @@ func (s *session) run() { select { case data := <-s.in: switch data.(type) { - case SessionShouldDisconnect: return - default: log.Printf("Unknown data '%d'!\n", data) + case SessionShouldDisconnect: + return + default: + log.Printf("Unknown data '%d'!\n", data) } case _ = <-s.rx: // TODO route received XML token here -- cgit v1.2.3-70-g09d2