cephfs: add error for function args that must have data

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-06-29 16:02:07 -04:00 committed by John Mulligan
parent afc819354b
commit bf0e4723e2
1 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ package cephfs
import "C" import "C"
import ( import (
"errors"
"fmt" "fmt"
"github.com/ceph/go-ceph/internal/errutil" "github.com/ceph/go-ceph/internal/errutil"
@ -36,6 +37,14 @@ func getError(e C.int) error {
// Public go errors: // 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 ( const (
// ErrNotConnected may be returned when client is not connected // ErrNotConnected may be returned when client is not connected
// to a cluster. // to a cluster.