| commit | b04f3b06ec347543b0eafe82dcfb0e05885d3feb | [log] [tgz] |
|---|---|---|
| author | Nathan VanBenschoten <nvanbenschoten@gmail.com> | Tue Dec 22 02:40:47 2015 -0500 |
| committer | Russ Cox <rsc@golang.org> | Fri Feb 19 01:06:05 2016 +0000 |
| tree | c9d889546ef895fce8b8a2c04c7e06cc998c1842 | |
| parent | 952c2fd606fad19b930937ca0d5c5571d7f5d4cb [diff] [blame] |
all: replace strings.Index with strings.Contains where possible Change-Id: Ia613f1c37bfce800ece0533a5326fca91d99a66a Reviewed-on: https://go-review.googlesource.com/18120 Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org>
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go index 8ebd693..9fcd5d7 100644 --- a/src/encoding/xml/marshal.go +++ b/src/encoding/xml/marshal.go
@@ -850,7 +850,7 @@ switch k { case reflect.String: s := vf.String() - dashDash = strings.Index(s, "--") >= 0 + dashDash = strings.Contains(s, "--") dashLast = s[len(s)-1] == '-' if !dashDash { p.WriteString(s)