• Martin Möhrmann's avatar
    fmt: remove depth argument from handleMethods and printArg · 2f4d4206
    Martin Möhrmann authored
    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: default avatarRob Pike <r@golang.org>
    2f4d4206
print.go 29 KB