Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

rc: export NewErrParamInvalid #5164

Ivan Andreev79b6866b57ce
diff --git a/fs/rc/params.go b/fs/rc/params.go
index 405109543..23b8a64d8 100644
--- a/fs/rc/params.go
+++ b/fs/rc/params.go
@@ -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)