From 0163b3b32cad2ed3331e2b197c68387f12246cd8 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Sun, 20 Aug 2023 18:33:50 +0800 Subject: 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 Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Bryan Mills Run-TryBot: shuang cui Reviewed-by: Filippo Valsorda TryBot-Result: Gopher Robot --- src/runtime/testdata/testprogcgo/numgoroutine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/testdata') 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 -- cgit v1.3-5-g9baa