diff options
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/xml/marshal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go index ec4822b5c1..609c790520 100644 --- a/src/encoding/xml/marshal.go +++ b/src/encoding/xml/marshal.go @@ -856,7 +856,7 @@ func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error { } case reflect.Slice: b := vf.Bytes() - dashDash = bytes.Index(b, ddBytes) >= 0 + dashDash = bytes.Contains(b, ddBytes) dashLast = b[len(b)-1] == '-' if !dashDash { p.Write(b) |
