Skip to content

x/tools/cmd/goimports: rewrite 0X->0x, 0O->0o as gofmt does #37453

@cespare

Description

@cespare

In Go 1.13, gofmt started canonicalizing hex literals written as 0XABC as 0xABC and also started rewriting the newly introduced octal literals written as 0O123 as 0o123. But goimports doesn't do this rewriting. This means that code formatted by goimports may be further altered by gofmt, which I think we've always tried to avoid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions