diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2023-09-12 18:46:45 -0700 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-09-20 18:57:24 +0000 |
commit | 5b37d720e39037fec4e298c3ae44d6487f029f92 (patch) | |
tree | 013854f0d963a6b33e17fea28d48b51f9d175d10 /src/context | |
parent | 77a1104975ebf5646f38978a054afe7ca4501fd8 (diff) | |
download | go-5b37d720e39037fec4e298c3ae44d6487f029f92.tar.gz go-5b37d720e39037fec4e298c3ae44d6487f029f92.zip |
all: stop using fmt.Sprintf in t.Error/t.Fatal
Change-Id: Id63e1e5ae7e225e4a6a721673bf2d43b6c398c25
Reviewed-on: https://go-review.googlesource.com/c/go/+/527701
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/context')
-rw-r--r-- | src/context/x_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/context/x_test.go b/src/context/x_test.go index e006e53470..b1012fad87 100644 --- a/src/context/x_test.go +++ b/src/context/x_test.go @@ -408,8 +408,9 @@ func testLayers(t *testing.T, seed int64, testTimeout bool) { t.Parallel() r := rand.New(rand.NewSource(seed)) + prefix := fmt.Sprintf("seed=%d", seed) errorf := func(format string, a ...any) { - t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) + t.Errorf(prefix+format, a...) } const ( minLayers = 30 |