chore: move errors

This commit is contained in:
Noah Hsu
2022-06-23 15:57:10 +08:00
parent 2612cd7f1c
commit c3040fdfc3
8 changed files with 22 additions and 27 deletions

21
internal/errs/errors.go Normal file
View File

@ -0,0 +1,21 @@
package errs
import (
"errors"
pkgerr "github.com/pkg/errors"
)
var (
ErrorObjectNotFound = errors.New("object not found")
ErrNotImplement = errors.New("not implement")
ErrNotSupport = errors.New("not support")
ErrRelativePath = errors.New("access using relative path is not allowed")
ErrMoveBetweenTwoAccounts = errors.New("can't move files between two account, try to copy")
ErrUploadNotSupported = errors.New("upload not supported")
ErrNotFolder = errors.New("not a folder")
)
func IsErrObjectNotFound(err error) bool {
return pkgerr.Cause(err) == ErrorObjectNotFound
}