1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

rc: export NewErrParamInvalid #5164

This commit is contained in:
Ivan Andreev
2021-10-08 12:31:17 +03:00
parent c142e3edcc
commit 79b6866b57

View File

@@ -56,6 +56,11 @@ type ErrParamInvalid struct {
error
}
// NewErrParamInvalid returns new ErrParamInvalid from given error
func NewErrParamInvalid(err error) ErrParamInvalid {
return ErrParamInvalid{err}
}
// IsErrParamInvalid returns whether err is ErrParamInvalid
func IsErrParamInvalid(err error) bool {
_, isInvalid := err.(ErrParamInvalid)