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

icholy opened this issue Dec 6, 2017 · 2 comments


None yet
3 participants
Copy link

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.


This comment has been minimized.

Copy link

commented Dec 6, 2017

Executable for who?

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


This comment has been minimized.

Copy link

commented Dec 6, 2017

@bradfitz makes sense

@icholy icholy closed this 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.
You can’t perform that action at this time.