From bf0e4723e2253652507479bd2826957b5adfb00a Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 29 Jun 2020 16:02:07 -0400 Subject: [PATCH] cephfs: add error for function args that must have data Signed-off-by: John Mulligan --- cephfs/errors.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cephfs/errors.go b/cephfs/errors.go index b397e9e..52d5aa7 100644 --- a/cephfs/errors.go +++ b/cephfs/errors.go @@ -6,6 +6,7 @@ package cephfs import "C" import ( + "errors" "fmt" "github.com/ceph/go-ceph/internal/errutil" @@ -36,6 +37,14 @@ func getError(e C.int) error { // Public go errors: +var ( + // ErrEmptyArgument may be returned if a function argument is passed + // a zero-length slice or map. + ErrEmptyArgument = errors.New("Argument must contain at least one item") +) + +// Public CephFSErrors: + const ( // ErrNotConnected may be returned when client is not connected // to a cluster.