Skip to content

print uint's in decimal? #185

Closed
Closed
@Dieterbe

Description

@Dieterbe

Hello. Great library! I enjoy using it in my unit tests.
Just one request:
This program:

package main

import (
	"fmt"

	"github.com/google/go-cmp/cmp"
)

func main() {
	fmt.Println(cmp.Diff(uint32(42), uint32(4)))
}

prints:

  uint32(
- 	0x2a,
+ 	0x04,
  )

this is hard to understand for humans. It would be nice if there was a mode to print these numbers in decimal form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions