From 007f413e457ff0b733447acba61b11d6813dd41c Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 6 Jul 2023 21:43:42 +0200 Subject: Apply go fmt --- xmpp/iq.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xmpp/iq.go b/xmpp/iq.go index d3d77b1..1cb7fd5 100644 --- a/xmpp/iq.go +++ b/xmpp/iq.go @@ -3,24 +3,24 @@ package xmpp import ( "encoding/xml" "fmt" - "math/rand" "log" + "math/rand" ) type iqRx struct { XMLName xml.Name `xml:"jabber:client iq"` - Type string `xml:"type,attr"` - Id string `xml:"id,attr"` - Bind struct{ + Type string `xml:"type,attr"` + Id string `xml:"id,attr"` + Bind struct { Jid string `xml:"jid"` } `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"` Query []RosterItem `xml:"jabber:iq:roster query>item"` } type RosterItem struct { - Jid string `xml:"jid,attr"` + Jid string `xml:"jid,attr"` Subscription string `xml:"subscription,attr"` - Name string `xml:"name,attr"` + Name string `xml:"name,attr"` } func (i iqRx) handle(s *session) { @@ -41,9 +41,9 @@ func (i iqRx) handle(s *session) { type bindSet struct { XMLName xml.Name `xml:"jabber:client iq"` - Type string `xml:"type,attr,omitempty"` - Id string `xml:"id,attr,omitempty"` - Bind struct{ + Type string `xml:"type,attr,omitempty"` + Id string `xml:"id,attr,omitempty"` + Bind struct { Resource string `xml:"resource,omitempty"` } `xml:"urn:ietf:params:xml:ns:xmpp-bind bind,omitempty"` } @@ -64,9 +64,9 @@ func (s *session) sendBind() { type rosterGet struct { XMLName xml.Name `xml:"jabber:client iq"` - Type string `xml:"type,attr,omitempty"` - Id string `xml:"id,attr,omitempty"` - Query string `xml:"jabber:iq:roster query"` + Type string `xml:"type,attr,omitempty"` + Id string `xml:"id,attr,omitempty"` + Query string `xml:"jabber:iq:roster query"` } func (s *session) sendRosterGet() { -- cgit v1.2.3-70-g09d2