]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vet: %#q is a valid format (uses raw quotes).
authorDavid Symonds <dsymonds@golang.org>
Mon, 7 Jan 2013 04:31:51 +0000 (15:31 +1100)
committerDavid Symonds <dsymonds@golang.org>
Mon, 7 Jan 2013 04:31:51 +0000 (15:31 +1100)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7057051

src/cmd/vet/print.go

index e8b51a2a82e6b0c20bcf28eb546262c7d587f6a2..cda5fcd7c8e08c200de83e350f161256b4fc1f6e 100644 (file)
@@ -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