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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
// 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
}