aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/cover
diff options
context:
space:
mode:
authorPolina Osadcha <polliosa@google.com>2020-06-18 16:17:13 +0300
committerMartin Möhrmann <moehrmann@google.com>2020-08-17 04:07:23 +0000
commit6f99b33c18266a8858af96163de97173bdf6f081 (patch)
tree7db673aa7998efe9498978701fd404387a561d30 /src/cmd/cover
parentf7fc25ed5a16ee7678680ffd0bcc3078cc249e0a (diff)
downloadgo-6f99b33c18266a8858af96163de97173bdf6f081.tar.gz
go-6f99b33c18266a8858af96163de97173bdf6f081.zip
all: replace Replace(..., -1) with ReplaceAll(...)
Change-Id: I8f7cff7a83a9c50bfa3331e8b40e4a6c2e1c0eee Reviewed-on: https://go-review.googlesource.com/c/go/+/245198 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/cover')
-rw-r--r--src/cmd/cover/cover_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go
index 8a56e39011..1c252e6e45 100644
--- a/src/cmd/cover/cover_test.go
+++ b/src/cmd/cover/cover_test.go
@@ -179,7 +179,7 @@ func TestCover(t *testing.T) {
}
lines := bytes.Split(file, []byte("\n"))
for i, line := range lines {
- lines[i] = bytes.Replace(line, []byte("LINE"), []byte(fmt.Sprint(i+1)), -1)
+ lines[i] = bytes.ReplaceAll(line, []byte("LINE"), []byte(fmt.Sprint(i+1)))
}
// Add a function that is not gofmt'ed. This used to cause a crash.