aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/encoding/xml/marshal.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/encoding/xml/marshal.go')
-rw-r--r--src/pkg/encoding/xml/marshal.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkg/encoding/xml/marshal.go b/src/pkg/encoding/xml/marshal.go
index a6ee5d5128..06bdec4f73 100644
--- a/src/pkg/encoding/xml/marshal.go
+++ b/src/pkg/encoding/xml/marshal.go
@@ -196,7 +196,6 @@ func (enc *Encoder) EncodeToken(t Token) error {
p.WriteString("<!--")
p.Write(t)
p.WriteString("-->")
- return p.cachedWriteError()
case ProcInst:
if t.Target == "xml" || !isNameString(t.Target) {
return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target")
@@ -219,7 +218,7 @@ func (enc *Encoder) EncodeToken(t Token) error {
p.Write(t)
p.WriteString(">")
}
- return p.cachedWriteError()
+ return p.Flush()
}
type printer struct {