summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-06 21:43:42 +0200
committerxengineering <me@xengineering.eu>2023-07-06 21:43:42 +0200
commit007f413e457ff0b733447acba61b11d6813dd41c (patch)
treeb370e7c5b220351b9c42f8f19fa30672d8310724
parenta3e01c9a867791b466fe2a3e1d0efd77c840729b (diff)
downloadlimox-007f413e457ff0b733447acba61b11d6813dd41c.tar
limox-007f413e457ff0b733447acba61b11d6813dd41c.tar.zst
limox-007f413e457ff0b733447acba61b11d6813dd41c.zip
Apply go fmt
-rw-r--r--xmpp/iq.go24
1 files 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() {