Minor fixups to make this come closer to working. It doesn't actually
authorChris Jones <chris@cjones.org>
Sat, 31 Dec 2011 10:11:01 -0700
changeset 37 fbda8e925fdf
parent 36 9fe022261dcc
child 38 2839fece923e
Minor fixups to make this come closer to working. It doesn't actually work, though, because the nesting in XML is backwards from how it is in Go. <iq><query/></iq> vs. RosterIq { Iq }
roster.go
stream.go
structs.go
--- a/roster.go	Fri Dec 30 21:49:00 2011 -0700
+++ b/roster.go	Sat Dec 31 10:11:01 2011 -0700
@@ -36,6 +36,10 @@
 	Group []string
 }
 
+func (riq *RosterIq) MarshalXML() ([]byte, os.Error) {
+	return marshalXML(riq)
+}
+
 func (riq *RosterIq) InnerMarshal(w io.Writer) os.Error {
 	return xml.Marshal(w, riq.Query)
 }
--- a/stream.go	Fri Dec 30 21:49:00 2011 -0700
+++ b/stream.go	Sat Dec 31 10:11:01 2011 -0700
@@ -158,7 +158,7 @@
 				obj = con(&name)
 				xmlStr, _ := marshalXML(st)
 				r := bytes.NewBuffer(xmlStr)
-				err = xml.Unmarshal(r, &obj)
+				err = xml.Unmarshal(r, obj)
 				if err != nil {
 					log.Printf("ext unmarshal: %v",
 						err)
--- a/structs.go	Fri Dec 30 21:49:00 2011 -0700
+++ b/structs.go	Sat Dec 31 10:11:01 2011 -0700
@@ -99,6 +99,7 @@
 }
 
 type ExtendedStanza interface {
+	Stanza
 	InnerMarshal(io.Writer) os.Error
 }