From: David Symonds Date: Mon, 7 Jan 2013 04:31:51 +0000 (+1100) Subject: cmd/vet: %#q is a valid format (uses raw quotes). X-Git-Tag: go1.1rc2~1458 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=86aad668c0022f17a202fc8d4dd76a0456401048;p=gostls13.git cmd/vet: %#q is a valid format (uses raw quotes). R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7057051 --- 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