mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
more "declared and not used".
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
This commit is contained in:
parent
1a3198907b
commit
ca6a0fee1b
95 changed files with 221 additions and 218 deletions
|
|
@ -868,7 +868,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string {
|
|||
lastMatchEnd = a[1];
|
||||
|
||||
// Advance past this match; always advance at least one character.
|
||||
rune, width := utf8.DecodeRuneInString(src[searchPos:len(src)]);
|
||||
_, width := utf8.DecodeRuneInString(src[searchPos:len(src)]);
|
||||
if searchPos + width > a[1] {
|
||||
searchPos += width;
|
||||
} else if searchPos + 1 > a[1] {
|
||||
|
|
@ -912,7 +912,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte {
|
|||
lastMatchEnd = a[1];
|
||||
|
||||
// Advance past this match; always advance at least one character.
|
||||
rune, width := utf8.DecodeRune(src[searchPos:len(src)]);
|
||||
_, width := utf8.DecodeRune(src[searchPos:len(src)]);
|
||||
if searchPos + width > a[1] {
|
||||
searchPos += width;
|
||||
} else if searchPos + 1 > a[1] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue