The proto write type code stored in buffer stores unprintable values (e.g. 2 when unmarshalling). The desired output when printing an error message is the string representation of the integer (i.e. strconv.Itoa), instead of the current behavior string(int) or string(rune), which return the utf8 literal corresponding to the integer. As pointed out by @ianlancetaylor in https://github.com/google/pprof/commit/4ac0da8#commitcomment-37524728, commit 4ac0da8 preserves the previous incorrect behavior to pass a vet check, whereas this change prints the desired output. Updates golang/go#32479.
|
|
||
33 |
|
33 |
|
34 |
|
34 |
|
35 |
|
35 |
|
36 |
|
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
37 |
|
40 |
|
38 |
|
41 |
|
39 |
|
42 |
|
|
|
||
235 |
|
238 |
|
236 |
|
239 |
|
237 |
|
240 |
|
238 |
|
|
|
|
241 |
|
|
239 |
|
242 |
|
240 |
|
243 |
|
241 |
|
244 |
|