mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 03:15:19 +08:00
20 lines
448 B
Go
20 lines
448 B
Go
package errs
|
|
|
|
import (
|
|
"errors"
|
|
|
|
pkgerr "github.com/pkg/errors"
|
|
)
|
|
|
|
var (
|
|
ObjectNotFound = errors.New("object not found")
|
|
ObjectAlreadyExists = errors.New("object already exists")
|
|
NotFolder = errors.New("not a folder")
|
|
NotFile = errors.New("not a file")
|
|
IgnoredSystemFile = errors.New("system file upload ignored")
|
|
)
|
|
|
|
func IsObjectNotFound(err error) bool {
|
|
return errors.Is(pkgerr.Cause(err), ObjectNotFound)
|
|
}
|