diff options
author | xengineering <me@xengineering.eu> | 2023-07-06 21:43:42 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-06 21:43:42 +0200 |
commit | 007f413e457ff0b733447acba61b11d6813dd41c (patch) | |
tree | b370e7c5b220351b9c42f8f19fa30672d8310724 | |
parent | a3e01c9a867791b466fe2a3e1d0efd77c840729b (diff) | |
download | limox-007f413e457ff0b733447acba61b11d6813dd41c.tar limox-007f413e457ff0b733447acba61b11d6813dd41c.tar.zst limox-007f413e457ff0b733447acba61b11d6813dd41c.zip |
Apply go fmt
-rw-r--r-- | xmpp/iq.go | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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() { |