1
mirror of https://github.com/rclone/rclone synced 2024-12-20 10:25:56 +01: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)