From 89e13c80efe19caa7deb8e4a5b0ccfa385a8b0bf Mon Sep 17 00:00:00 2001
From: Andrew Bonventre
Date: Thu, 9 Aug 2018 19:43:54 -0400
Subject: [PATCH] doc/go1.11: add note about vet checks for printf wrappers
Fixes golang/go#26372
Change-Id: I30716ba56f829c6e36ccd50471e118084bad7360
Reviewed-on: https://go-review.googlesource.com/128902
Reviewed-by: Russ Cox
---
doc/go1.11.html | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/doc/go1.11.html b/doc/go1.11.html
index e76e21c52e..a1249db475 100644
--- a/doc/go1.11.html
+++ b/doc/go1.11.html
@@ -299,6 +299,22 @@ func f(v interface{}) {
a warning to be printed, and vet
to exit with status 1.
+
+ Additionally, go
vet
+ has become more robust when format-checking printf
wrappers.
+ Vet now detects the mistake in this example:
+
+
+
+func wrapper(s string, args ...interface{}) {
+ fmt.Printf(s, args...)
+}
+
+func main() {
+ wrapper("%s", 42)
+}
+
+
Trace