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

Fix pre-commit bugs #209

Merged
merged 1 commit into from
Jul 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tools/check_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export PATH=/usr/bin:$PATH
pre-commit install
pre-commit --version

if ! pre-commit ; then
if ! pre-commit run -a ; then
git diff --exit-code
fi

Expand Down
1 change: 1 addition & 0 deletions go/filemanager/pfsmodules/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

const (
// StatCmdName means stat command name.
StatCmdName = "stat"
)

Expand Down
44 changes: 30 additions & 14 deletions go/filemanager/pfsmodules/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,36 @@ package pfsmodules
// need a custom error type?

const (
StatusFileNotFound = "no such file or directory"
StatusDirectoryNotAFile = "should be a file not a directory"
StatusCopyFromLocalToLocal = "don't support copy local to local"
// StatusFileNotFound is a error string of that there is no file or directory.
StatusFileNotFound = "no such file or directory"
// StatusDirectoryNotAFile is a error string of that the destination should be a file.
StatusDirectoryNotAFile = "should be a file not a directory"
// StatusCopyFromLocalToLocal is a error string of that this system does't support copy local to local.
StatusCopyFromLocalToLocal = "don't support copy local to local"
// StatusDestShouldBeDirectory is a error string of that destination shoule be a directory.
StatusDestShouldBeDirectory = "dest should be a directory"
StatusOnlySupportFiles = "only support upload or download files not directories"
StatusBadFileSize = "bad file size"
// StatusOnlySupportFiles is a error string of that the system only support upload or download files not directories.
StatusOnlySupportFiles = "only support upload or download files not directories"
// StatusBadFileSize is a error string of that the file size is no valid.
StatusBadFileSize = "bad file size"
// StatusDirectoryAlreadyExist is a error string of that the directory is already exist.
StatusDirectoryAlreadyExist = "directory already exist"
StatusBadChunkSize = "chunksize error"
StatusShouldBePfsPath = "should be pfs path"
StatusNotEnoughArgs = "not enough arguments"
StatusInvalidArgs = "invalid arguments"
StatusUnAuthorized = "what you request is unauthorized"
StatusJSONErr = "parse json error"
StatusCannotDelDirectory = "can't del directory"
StatusAlreadyExist = "already exist"
StatusBadPath = "the path should be in format eg:/pf/datacentername/"
// StatusBadChunkSize is a error string of that the chunksize is error.
StatusBadChunkSize = "chunksize error"
// StatusShouldBePfsPath is a error string of that a path should be a pfs path.
StatusShouldBePfsPath = "should be pfs path"
// StatusNotEnoughArgs is a error string of that there is not enough arguments.
StatusNotEnoughArgs = "not enough arguments"
// StatusInvalidArgs is a error string of that arguments are not valid.
StatusInvalidArgs = "invalid arguments"
// StatusUnAuthorized is a error string of that what you request should have authorization.
StatusUnAuthorized = "what you request is unauthorized"
// StatusJSONErr is a error string of that the system parses json error.
StatusJSONErr = "parse json error"
// StatusCannotDelDirectory is a error string of that what you input can't delete a directory.
StatusCannotDelDirectory = "can't del directory"
// StatusAlreadyExist is a error string of that the destination is already exist.
StatusAlreadyExist = "already exist"
// StatusBadPath is a error string of that the form of path is not correct.
StatusBadPath = "the path should be in format eg:/pf/datacentername/"
)