]> Cypherpunks repositories - gostls13.git/commit
fmt: remove depth argument from handleMethods and printArg
authorMartin Möhrmann <martisch@uos.de>
Sat, 19 Mar 2016 12:18:43 +0000 (13:18 +0100)
committerRob Pike <r@golang.org>
Sat, 19 Mar 2016 21:45:13 +0000 (21:45 +0000)
commit2f4d4206831b722070fecd7efcd0f1b122aa3760
tree72a3cd7e61618d9a9963a63d58951ff045105590
parent5f525ca60db46a569da302acf3413f62897a04fc
fmt: remove depth argument from handleMethods and printArg

handleMethods can format Error() and String() directly as its known
these return strings that can be directly printed using fmtString.
Remove the obsolete depth argument from handleMethods.

Remove the depth argument from printArg since it is only ever
called with depth set to 0. Recursion for formatting complex
arguments is handled only by printValue which keeps track of depth.

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