8000 Print uint in decimal? · Issue #93 · kr/pretty · GitHub
[go: up one dir, main page]

Skip to content

Print uint in decimal? #93

Open
Open

Description

@ajitid

Same request as google/go-cmp#185, where the conclusion was to print all unsigned integers in decimal form, except uint8 and uintptr which would be printed in hex (see this change).
I think diff should have the same support as well.

Activity

  1. ajitid commented on Apr 1, 2023

    @ajitid
    Author

    Unrelated: is there a way to print rune character instead of the Unicode number it maps to?

  2. kr commented on Apr 1, 2023

    @kr
    Owner

    print all unsigned integers in decimal form, except uint8 and uintptr which would be printed in hex

    This seems reasonable to me!

  3. kr commented on Apr 1, 2023

    @kr
    Owner

    Unrelated: is there a way to print rune character instead of the Unicode number it maps to?

    Type rune is an alias for int; there's no way for this package to distinguish them. Best idea I know of is to print both the decimal value and the character (if the character is printable) for all int values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0