Refactor attributes name

This commit is contained in:
Mickael Remond
2018-01-13 17:54:07 +01:00
parent d2765aec15
commit 01063ec284
9 changed files with 14 additions and 14 deletions

View File

@@ -7,9 +7,9 @@ import (
)
type iq struct {
XMLName xml.Name `xml:"jabber:client iq"`
C pubSub // c for "contains"
xmpp.Packet // Rename h for "header" ?
XMLName xml.Name `xml:"jabber:client iq"`
C pubSub // c for "contains"
xmpp.PacketAttrs // Rename h for "header" ?
}
type pubSub struct {
@@ -68,7 +68,7 @@ type Tune struct {
*/
func (t *Tune) XMPPFormat() (s string) {
packet, _ := xml.Marshal(iq{Packet: xmpp.Packet{Id: "tunes", Type: "set"}, C: pubSub{Publish: publish{Node: "http://jabber.org/protocol/tune", Item: item{Tune: *t}}}})
packet, _ := xml.Marshal(iq{PacketAttrs: xmpp.PacketAttrs{Id: "tunes", Type: "set"}, C: pubSub{Publish: publish{Node: "http://jabber.org/protocol/tune", Item: item{Tune: *t}}}})
return string(packet)
}