Descriptionfmt: print byte stringers correctly
type T byte
func (T) String() string { return "X" }
fmt.Sprintf("%s", []T{97, 98, 99, 100}) == "abcd"
fmt.Sprintf("%x", []T{97, 98, 99, 100}) == "61626364"
fmt.Sprintf("%v", []T{97, 98, 99, 100}) == "[X X X X]"
This change makes the last case print correctly.
Before, it would have been "[97 98 99 100]".
Fixes issue 8360.
Patch Set 1 #Patch Set 2 : diff -r 55f09668f3b265c909e04580abec3ba84add2bae https://code.google.com/p/go #
Total comments: 4
Patch Set 3 : diff -r 55f09668f3b265c909e04580abec3ba84add2bae https://code.google.com/p/go #Patch Set 4 : diff -r 4fa514b5c635be9f99e63bb71c819289e307b7c6 https://code.google.com/p/go #
MessagesTotal messages: 9
|