Skip to content

Commit

Permalink
Add comment to uint8 and uintptr format
Browse files Browse the repository at this point in the history
  • Loading branch information
178inaba committed May 13, 2020
1 parent 3a853e2 commit de95227
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmp/report_slices.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64:
ss = append(ss, fmt.Sprint(v.Index(i).Uint()))
case reflect.Uint8, reflect.Uintptr:
// If it is uint8 which is an alias of byte, format it to hex.
ss = append(ss, formatHex(v.Index(i).Uint()))
case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128:
ss = append(ss, fmt.Sprint(v.Index(i).Interface()))
Expand Down

0 comments on commit de95227

Please sign in to comment.