• Martin Möhrmann's avatar
    fmt: refactor pointer formatting and improve tests · 8e231567
    Martin Möhrmann authored
    Uses a switch statement for direct format function selection
    similar to other types verb handling in fmt.
    
    Applies padding also to nil pointers formatted with %v.
    
    Guards against "slice bounds out of range" panic in TestSprintf
    when a pointer test results in a formatted string s
    that is shorter than the index i the pointer should appear in.
    
    Adds more and rearranges tests.
    
    Fixes #14712
    Fixes #14714
    
    Change-Id: Iaf5ae37b7e6ba7d27d528d199f2b2eb9d5829b8c
    Reviewed-on: https://go-review.googlesource.com/20371
    Run-TryBot: Rob Pike <r@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    8e231567
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...