• Rob Pike's avatar
    fmt: make the %#v verb a special flag · 7c8e057a
    Rob Pike authored
    The %#v verb is special: it says all values below need to print as %#v.
    However, for some situations the # flag has other meanings and this
    causes some issues, particularly in how Formatters work. Since %#v
    dominates all formatting, translate it into actual state of the formatter
    and decouple it from the # flag itself within the calculations (although
    it must be restored when methods are doing the work.)
    The result is cleaner code and correct handling of # for Formatters.
    TODO: Apply the same thinking to the + flag in a followup CL.
    
    Also, the wasString return value in handleMethods is always false,
    so eliminate it.
    
    Update #8835
    
    LGTM=iant
    R=golang-codereviews, iant
    CC=golang-codereviews
    https://golang.org/cl/146650043
    7c8e057a
Name
Last commit
Last update
..
doc.go Loading commit data...
export_test.go Loading commit data...
fmt_test.go Loading commit data...
format.go Loading commit data...
print.go Loading commit data...
scan.go Loading commit data...
scan_test.go Loading commit data...
stringer_test.go Loading commit data...