mirror of
https://github.com/golang/go.git
synced 2025-11-03 10:10:55 +00:00
all: go fmt
Change-Id: I6a6a636c341d4ba3518be7f6806093bbdff11c88 Reviewed-on: https://go-review.googlesource.com/c/go/+/689535 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
1aaf7422f1
commit
4ed9943b26
5 changed files with 7 additions and 9 deletions
|
|
@ -73,4 +73,3 @@ func Atoi32(s string) (int32, bool) {
|
||||||
}
|
}
|
||||||
return 0, false
|
return 0, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,3 @@ func TestAtoi32(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ func DecodeLastRune(p []byte) (r rune, size int) {
|
||||||
// guard against O(n^2) behavior when traversing
|
// guard against O(n^2) behavior when traversing
|
||||||
// backwards through strings with long sequences of
|
// backwards through strings with long sequences of
|
||||||
// invalid UTF-8.
|
// invalid UTF-8.
|
||||||
lim := max(end - UTFMax, 0)
|
lim := max(end-UTFMax, 0)
|
||||||
for start--; start >= lim; start-- {
|
for start--; start >= lim; start-- {
|
||||||
if RuneStart(p[start]) {
|
if RuneStart(p[start]) {
|
||||||
break
|
break
|
||||||
|
|
@ -300,7 +300,7 @@ func DecodeLastRuneInString(s string) (r rune, size int) {
|
||||||
// guard against O(n^2) behavior when traversing
|
// guard against O(n^2) behavior when traversing
|
||||||
// backwards through strings with long sequences of
|
// backwards through strings with long sequences of
|
||||||
// invalid UTF-8.
|
// invalid UTF-8.
|
||||||
lim := max(end - UTFMax, 0)
|
lim := max(end-UTFMax, 0)
|
||||||
for start--; start >= lim; start-- {
|
for start--; start >= lim; start-- {
|
||||||
if RuneStart(s[start]) {
|
if RuneStart(s[start]) {
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue