all: simplify and clarify some expressions#260
Conversation
| return nil, fmt.Errorf("open file blob %s: extension %q is reserved and cannot be used", key, attrsExt) | ||
| } | ||
| if err := os.MkdirAll(filepath.Dir(path), 0777); err != nil { | ||
| if err := os.MkdirAll(filepath.Dir(path), os.ModePerm); err != nil { |
There was a problem hiding this comment.
You shouldn't change 0777 to os.ModePerm.
This is a false positive from namedConst checker.
|
All of these are false positives, please, revert related changes: (Basically, everything with |
| func (d dirInfo) Name() string { return d.name } | ||
| func (d dirInfo) Size() int64 { return 0 } | ||
| func (d dirInfo) Mode() os.FileMode { return os.ModeDir | 0777 } | ||
| func (d dirInfo) Mode() os.FileMode { return os.ModeDir | os.ModePerm } |
There was a problem hiding this comment.
Hmm.. I guess this is the only place where you might want to use os.ModePerm, since it looks like 0777 is used as a perm bits mask (purpose that os.ModePerm serves; it's a mask, not a 0777 perm value).
|
@shantuo Are you merging this in? |
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
|
Hi @ijt please also approve to pass the check. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
|
Thanks to everyone 👍 |
Changes were suggested by go-critic linter.
Full log: