]> Cypherpunks repositories - gostls13.git/commit
fmt: cleanup %p and %T code paths
authorMartin Möhrmann <martisch@uos.de>
Sat, 12 Mar 2016 12:53:19 +0000 (13:53 +0100)
committerRob Pike <r@golang.org>
Wed, 16 Mar 2016 05:13:10 +0000 (05:13 +0000)
commitb8ddcc0a03415786bb6278849530c88bfa5b97e6
treee8146ab3802c9d5e27f1690953f0759e4fa7924c
parentfee86e4aa81712596d2e6151dc85821953dde107
fmt: cleanup %p and %T code paths

Remove check for %p and %T in printValue.
These verbs are not recursive and are handled already in
printArg which is called on any argument before printValue.

Format the type string for %T directly instead of invoking
the more complex printArg with %s on the type string.

Decouple the %T tests from variables declared in scan_test.go.

Change-Id: Ibd51566bd4cc1a260ce6d052f36382ed05020b48
Reviewed-on: https://go-review.googlesource.com/20622
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/fmt_test.go
src/fmt/print.go