Skip to content

Use more explicit octal representation for clarity #3160

@simonbaird

Description

@simonbaird

My editor's autoformat started doing this:

-       f, err := fs.OpenFile(inputJSONPath, os.O_CREATE|os.O_WRONLY|os.O_EXCL, 0644)
+       f, err := fs.OpenFile(inputJSONPath, os.O_CREATE|os.O_WRONLY|os.O_EXCL, 0o644)

The reasoning is guess is that 0oNNN is more explicit and less likely to be misinterpreted. Let's change them all consistently in one neat PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions