--- a/structs.go Sun Dec 25 19:02:53 2011 -0700
+++ b/structs.go Mon Dec 26 11:48:35 2011 -0700
@@ -66,9 +66,23 @@
}
var _ xml.Marshaler = &errText{}
+type Features struct {
+ Starttls starttls
+ Mechanisms mechs
+}
+
+type starttls struct {
+ required *string
+}
+
+type mechs struct {
+ Mechanism []string
+}
+
type Unrecognized struct {
XMLName xml.Name
}
+var _ fmt.Stringer = &Unrecognized{}
func (jid *JID) String() string {
result := jid.Domain
@@ -171,3 +185,8 @@
io.WriteString(w, `"`)
}
}
+
+func (u *Unrecognized) String() string {
+ return fmt.Sprintf("unrecognized{%s %s}", u.XMLName.Space,
+ u.XMLName.Local)
+}