From 33e98326a25d54cef19e94ca73c45eaed8847f56 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 26 Feb 2020 18:34:25 -0800 Subject: [PATCH] net/textproto: pass missing argument to fmt.Sprintf The vet tool didn't catch this because the fmt.Sprintf format argument was written as an expression. Fixes #37467 Change-Id: I72c20ba45e3f42c195fa5e68adcdb9837c7d7ad5 Reviewed-on: https://go-review.googlesource.com/c/go/+/221297 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Emmanuel Odeke --- src/net/textproto/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go index a505da985c..d26e981ae4 100644 --- a/src/net/textproto/reader.go +++ b/src/net/textproto/reader.go @@ -557,7 +557,7 @@ func noValidation(_ []byte) error { return nil } // contain a colon. func mustHaveFieldNameColon(line []byte) error { if bytes.IndexByte(line, ':') < 0 { - return ProtocolError(fmt.Sprintf("malformed MIME header: missing colon: %q" + string(line))) + return ProtocolError(fmt.Sprintf("malformed MIME header: missing colon: %q", line)) } return nil }