From 79b6866b57ce573eca037c1546f94993e5b89f14 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Fri, 8 Oct 2021 12:31:17 +0300 Subject: [PATCH] rc: export NewErrParamInvalid #5164 --- fs/rc/params.go | 5 +++++ 1 file changed, 5 insertions(+) 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)