diff options
| author | Alan Donovan <adonovan@google.com> | 2024-05-23 10:47:36 -0400 |
|---|---|---|
| committer | Alan Donovan <adonovan@google.com> | 2024-05-23 18:42:28 +0000 |
| commit | bf91eb3a8bb057a620f3823e4d6b74a529c0a44d (patch) | |
| tree | 4492b65fecf2d22336f43b63794296541d56209a /src/net/http/serve_test.go | |
| parent | c34c124f4007e79978674ba519b9421665060186 (diff) | |
| download | go-bf91eb3a8bb057a620f3823e4d6b74a529c0a44d.tar.xz | |
std: fix calls to Printf(s) with non-constant s
In all cases the intent was not to interpret s as a format string.
In one case (go/types), this was a latent bug in production.
(These were uncovered by a new check in vet's printf analyzer.)
Updates #60529
Change-Id: I3e17af7e589be9aec1580783a1b1011c52ec494b
Reviewed-on: https://go-review.googlesource.com/c/go/+/587855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/net/http/serve_test.go')
| -rw-r--r-- | src/net/http/serve_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go index 5014c24969..34b7d57f40 100644 --- a/src/net/http/serve_test.go +++ b/src/net/http/serve_test.go @@ -4743,11 +4743,11 @@ Host: foo func TestHandlerFinishSkipBigContentLengthRead(t *testing.T) { setParallel(t) conn := newTestConn() - conn.readBuf.Write([]byte(fmt.Sprintf( + conn.readBuf.WriteString( "POST / HTTP/1.1\r\n" + "Host: test\r\n" + "Content-Length: 9999999999\r\n" + - "\r\n" + strings.Repeat("a", 1<<20)))) + "\r\n" + strings.Repeat("a", 1<<20)) ls := &oneConnListener{conn} var inHandlerLen int |
