fix syntax errors (#145)

* Fix syntax errors.

* gofmt
This commit is contained in:
Martin 2023-03-02 16:20:58 +01:00 committed by GitHub
parent d72a0f3154
commit 9129a110df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -568,9 +568,9 @@ func (c *Client) startStream(o *Options, domain string) (*streamFeatures, error)
StanzaWriter = c.conn StanzaWriter = c.conn
} }
_, err := fmt.Fprintf(StanzaWriter, "<?xml version='1.0'?>\n"> _, err := fmt.Fprintf(StanzaWriter, "<?xml version='1.0'?>"+
"<stream:stream to='%s' xmlns='%s'"+ "<stream:stream to='%s' xmlns='%s'"+
" xmlns:stream='%s' version='1.0'>\n", " xmlns:stream='%s' version='1.0'>",
xmlEscape(domain), nsClient, nsStream) xmlEscape(domain), nsClient, nsStream)
if err != nil { if err != nil {
return nil, err return nil, err
@ -831,7 +831,7 @@ func (c *Client) Recv() (stanza interface{}, err error) {
pubsubItemsToReturn(p.Items), pubsubItemsToReturn(p.Items),
}, nil }, nil
} }
}
// Note: XEP-0084 states that metadata and data // Note: XEP-0084 states that metadata and data
// should be fetched with an id of retrieve1. // should be fetched with an id of retrieve1.
// Since we already have PubSub implemented, we // Since we already have PubSub implemented, we