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

Add os.ModeExecutable #23018

Closed
icholy opened this issue Dec 6, 2017 · 2 comments
Closed

Add os.ModeExecutable #23018

icholy opened this issue Dec 6, 2017 · 2 comments

Comments

@icholy
Copy link

icholy commented Dec 6, 2017

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

go version go1.9 linux/amd64

What did you do?

Tried to determine if a file is executable

info, _ := os.Stat(file)
isExecutable := info.Mode()&os.ModeExecutable == 0

What did you expect to see?

os.ModeExecutable to equal 0111

What did you see instead?

os.ModeExecutable is not defined.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 6, 2017

Executable for who?

We also don't have ModeReadable and ModeWritable, so why just executable?

@icholy
Copy link
Author

icholy commented Dec 6, 2017

@bradfitz makes sense

@icholy icholy closed this as completed Dec 6, 2017
@golang golang locked and limited conversation to collaborators Dec 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants