From 86aad668c0022f17a202fc8d4dd76a0456401048 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 7 Jan 2013 15:31:51 +1100 Subject: [PATCH] cmd/vet: %#q is a valid format (uses raw quotes). R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7057051 --- src/cmd/vet/print.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/vet/print.go b/src/cmd/vet/print.go index e8b51a2a82..cda5fcd7c8 100644 --- a/src/cmd/vet/print.go +++ b/src/cmd/vet/print.go @@ -208,7 +208,7 @@ var printVerbs = []printVerb{ {'G', numFlag}, {'o', sharpNumFlag}, {'p', "-#"}, - {'q', " -+.0"}, + {'q', " -+.0#"}, {'s', " -+.0"}, {'t', "-"}, {'T', "-"}, @@ -287,6 +287,7 @@ func BadFunctionUsedInTests() { fmt.Printf("%.*d", 3, 3) // correct fmt.Printf("%.*d", 3, 3, 3) // ERROR "wrong number of args in Printf call" fmt.Printf("%q %q", multi()...) // ok + fmt.Printf("%#q", `blah`) // ok printf("now is the time", "buddy") // ERROR "no formatting directive" Printf("now is the time", "buddy") // ERROR "no formatting directive" Printf("hi") // ok -- 2.48.1