# HG changeset patch # User Chris Jones # Date 1324864973 25200 # Node ID 4f0f66f9a44163527b0eb9838834d663e56c51cf # Parent 8e425e340ca11e24537053b60934525d6f7e24ab Support contents for defined error conditions (such as ). diff -r 8e425e340ca1 -r 4f0f66f9a441 structs.go --- a/structs.go Sun Dec 25 18:46:13 2011 -0700 +++ b/structs.go Sun Dec 25 19:02:53 2011 -0700 @@ -57,6 +57,7 @@ type definedCondition struct { // Must always be in namespace nsStreams XMLName xml.Name + Chardata string `xml:"chardata"` } type errText struct { diff -r 8e425e340ca1 -r 4f0f66f9a441 structs_test.go --- a/structs_test.go Sun Dec 25 18:46:13 2011 -0700 +++ b/structs_test.go Sun Dec 25 19:02:53 2011 -0700 @@ -69,13 +69,13 @@ func TestStreamErrorMarshal(t *testing.T) { name := xml.Name{Space: nsStreams, Local: "ack"} - e := &StreamError{Any: definedCondition{name}} + e := &StreamError{Any: definedCondition{XMLName: name}} exp := ``; assertMarshal(t, exp, e) txt := errText{Lang: "pt", Text: "things happen"} - e = &StreamError{Any: definedCondition{name}, Text: &txt} + e = &StreamError{Any: definedCondition{XMLName: name}, Text: &txt} exp = `things happen`