Skip to content

os, io/ioutil: clarify ioutil.WriteFile and os.Mkdir docs re permissions and umask #35835

@mostynb

Description

@mostynb

What version of Go are you using (go version)?

go1.13.4

Does this issue reproduce with the latest release?

Yes

What did you do?

I noticed that the ioutil.WriteFile docs say "with permissions perm", but without any mention of umask:
https://golang.org/pkg/io/ioutil/#example_WriteFile

The implementation passes perm to os.OpenFile, whose docs do describe the interaction with the umask.

Then while browsing the os package's docs, I noticed a minor inconsistency in the phrasing around the permissions argument for os.Mkdir compared to os.MkdirAll and some other places in that pckage.

What did you expect to see?

Umask mentioned in ioutil.WriteFile docs.

What did you see instead?

No mention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions