aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2018-09-26 21:10:21 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2018-09-26 22:14:25 +0000
commitda0d1a44bac379f5acedb1933f85400de08f4ac6 (patch)
tree20ac5d1ee7aeed87d3fa33f7e401309d62207f30 /src/testing
parente35a41261b19589f40d32bd66274c23ab4b9b32e (diff)
downloadgo-da0d1a44bac379f5acedb1933f85400de08f4ac6.tar.xz
all: use strings.ReplaceAll and bytes.ReplaceAll where applicable
I omitted vendor directories and anything necessary for bootstrapping. (Tested by bootstrapping with Go 1.4) Updates #27864 Change-Id: I7d9b68d0372d3a34dee22966cca323513ece7e8a Reviewed-on: https://go-review.googlesource.com/137856 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/sub_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go
index 9af3909b35..29803c06e2 100644
--- a/src/testing/sub_test.go
+++ b/src/testing/sub_test.go
@@ -594,8 +594,8 @@ func TestBRun(t *T) {
func makeRegexp(s string) string {
s = regexp.QuoteMeta(s)
- s = strings.Replace(s, ":NNN:", `:\d\d\d:`, -1)
- s = strings.Replace(s, "N\\.NNs", `\d*\.\d*s`, -1)
+ s = strings.ReplaceAll(s, ":NNN:", `:\d\d\d:`)
+ s = strings.ReplaceAll(s, "N\\.NNs", `\d*\.\d*s`)
return s
}