Skip to content

Use 0o prefix for octal literals, and gofumpt all files#180

Merged
mvdan merged 1 commit intorogpeppe:masterfrom
bitfield:0o
Aug 22, 2022
Merged

Use 0o prefix for octal literals, and gofumpt all files#180
mvdan merged 1 commit intorogpeppe:masterfrom
bitfield:0o

Conversation

@bitfield
Copy link
Copy Markdown
Contributor

Since Go 1.13, octal literals can be written using an 0o prefix, instead of the (slightly) ambiguous 0. Indeed, gofumpt insists on this, and those of us who use gopls with gofumpt enabled have our octal literals rewritten for us automatically.

This commit applies that change, along with some other minor gofumpt-age, including adding or removing blank lines and reformatting doc comments.

Copy link
Copy Markdown
Collaborator

@mvdan mvdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goes without saying that I like these changes, but perhaps that isn't a proper approval 😉

@mvdan
Copy link
Copy Markdown
Collaborator

mvdan commented Aug 22, 2022

This feels low risk, so I'll go ahead and merge. @rogpeppe can always send a follow-up PR or a revert if he disagrees.

@mvdan mvdan merged commit 0d96cbe into rogpeppe:master Aug 22, 2022
@bitfield bitfield deleted the 0o branch August 22, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants