diff options
| author | cui fliter <imcusg@gmail.com> | 2023-08-20 18:33:50 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-08-22 22:52:37 +0000 |
| commit | 0163b3b32cad2ed3331e2b197c68387f12246cd8 (patch) | |
| tree | 37dc6b273af476869e38a4c6cc65e4482bf92437 /src/runtime/testdata | |
| parent | 291a32aa4bd894eaad0517ce1ac3e04dd885cb8b (diff) | |
| download | go-0163b3b32cad2ed3331e2b197c68387f12246cd8.tar.xz | |
all: remove redundant string conversions when formatting []byte with %s
Change-Id: I603051a3174b139ffb81d20d42979c7f3f04a09a
Reviewed-on: https://go-review.googlesource.com/c/go/+/521136
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/testdata')
| -rw-r--r-- | src/runtime/testdata/testprogcgo/numgoroutine.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprogcgo/numgoroutine.go b/src/runtime/testdata/testprogcgo/numgoroutine.go index 1b9f202f46..9cbb4e4b0d 100644 --- a/src/runtime/testdata/testprogcgo/numgoroutine.go +++ b/src/runtime/testdata/testprogcgo/numgoroutine.go @@ -70,7 +70,7 @@ func checkNumGoroutine(label string, want int) (string, bool) { sbuf = sbuf[:runtime.Stack(sbuf, true)] n = strings.Count(string(sbuf), "goroutine ") if n != want { - fmt.Printf("%s Stack: want %d; got %d:\n%s\n", label, want, n, string(sbuf)) + fmt.Printf("%s Stack: want %d; got %d:\n%s\n", label, want, n, sbuf) return "", false } return string(sbuf), true |
