aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorDominik Honnef <dominik@honnef.co>2016-04-01 03:49:43 +0200
committerDave Cheney <dave@cheney.net>2016-04-01 02:05:01 +0000
commit1cb3044c9fcd88e1557eca1bf35845a4108bc1db (patch)
tree0ab6a665c480df7fa978af784cb2bb702acdc27f /src/encoding
parent42d62946946eb0e6dc55fe76973c84eafd113154 (diff)
downloadgo-1cb3044c9fcd88e1557eca1bf35845a4108bc1db.tar.xz
all: use bytes.Equal, bytes.Contains and strings.Contains
Change-Id: Iba82a5bd3846f7ab038cc10ec72ff6bcd2c0b484 Reviewed-on: https://go-review.googlesource.com/21377 Run-TryBot: Dave Cheney <dave@cheney.net> Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/encoding')
-rw-r--r--src/encoding/xml/marshal.go2
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)