summaryrefslogtreecommitdiff
path: root/test/bench/regex-dna.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-25 16:01:29 -0800
committerRuss Cox <rsc@golang.org>2010-02-25 16:01:29 -0800
commit454796815f7f2e0e614b999f9cc1ef0e3e093b78 (patch)
treea0a5f67e4a643d3bdadd4e28cee9b0900401b62d /test/bench/regex-dna.go
parent975cc91983c054595b22502d7b9271a3d3cb828e (diff)
downloadgolang-454796815f7f2e0e614b999f9cc1ef0e3e093b78.tar.gz
strings: delete Runes, Bytes
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
Diffstat (limited to 'test/bench/regex-dna.go')
-rw-r--r--test/bench/regex-dna.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/bench/regex-dna.go b/test/bench/regex-dna.go
index 9d56830b3..22de2c6aa 100644
--- a/test/bench/regex-dna.go
+++ b/test/bench/regex-dna.go
@@ -40,7 +40,6 @@ import (
"io/ioutil"
"os"
"regexp"
- "strings"
)
var variants = []string{
@@ -101,7 +100,7 @@ func main() {
fmt.Printf("%s %d\n", s, countMatches(s, bytes))
}
for _, sub := range substs {
- bytes = regexp.MustCompile(sub.pat).ReplaceAll(bytes, strings.Bytes(sub.repl))
+ bytes = regexp.MustCompile(sub.pat).ReplaceAll(bytes, []byte(sub.repl))
}
fmt.Printf("\n%d\n%d\n%d\n", ilen, clen, len(bytes))
}