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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Copy link
Member

bradfitz commented Dec 6, 2017

Executable for who?

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

@icholy

This comment has been minimized.

Copy link

icholy 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.