Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: document that FileMode permission bits are Unix bits #7075

Closed
gopherbot opened this issue Jan 7, 2014 · 8 comments
Closed

os: document that FileMode permission bits are Unix bits #7075

gopherbot opened this issue Jan 7, 2014 · 8 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Jan 7, 2014

by Mortdeus@gocos2d.org:

It would be nice to add 

`rwx(111[7]) rw(110[6]) rx(101[5]) r(100[4]) wx(011[3]) w(010[2]) x(001[1])`

as a godoc comment at

https://code.google.com/p/go/source/browse/src/pkg/os/types.go#56
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 9, 2014

Comment 1:

Why?  It's pretty cryptic and ugly.
@mortdeus

This comment has been minimized.

Copy link

@mortdeus mortdeus commented Jan 9, 2014

Comment 2:

well, some gophers were confused in #go-nuts last night. 
It would just be nice to have a more descriptive comment, instead of one that assumes
all gophers understand Unix conventions.
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Jan 9, 2014

Comment 3:

And saying `rwx(111[7]) rw(110[6]) rx(101[5]) r(100[4]) wx(011[3]) w(010[2]) x(001[1])`
would teach them Unix?
It's possible we could add some comment, but it should be mostly English.
@davecheney

This comment has been minimized.

Copy link
Contributor

@davecheney davecheney commented Feb 3, 2014

Comment 4:

@mortdeus if you would like to tackle this one that would be great.

Labels changed: added release-none, repo-main, suggested.

Status changed to HelpWanted.

@glacjay

This comment has been minimized.

Copy link

@glacjay glacjay commented Feb 25, 2014

Comment 5:

maybe like this?
//                 read write exec
// 0777 (oct) = 0b   1    1    1    // user
//                   1    1    1    // group
//                   1    1    1    // other
@k4rtik

This comment has been minimized.

Copy link

@k4rtik k4rtik commented Oct 12, 2014

Comment 6:

Since `pkg` is gone, the correct URL referenced in OP for this issue is
https://code.google.com/p/go/source/browse/src/os/types.go#56
Also, I doubt this is really an issue. Even if someone doesn't know UNIX conventions for
permissions, how much time does it take to Google them up?
@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Apr 14, 2015

Let's change "// permission bits" to "// Unix permission bits" and be done.

@rsc rsc changed the title add bitmask legend to os.FileMode's godoc documentation. os: document that FileMode permission bits are Unix bits Apr 14, 2015
@rsc rsc modified the milestones: Go1.5, Unplanned Apr 14, 2015
@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Apr 14, 2015

@bradfitz bradfitz closed this in 015c760 Apr 16, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.