rados: clean up var lines in rados.go and add doc comments

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-01-22 14:28:26 -05:00 committed by John Mulligan
parent 1585362d3a
commit 5cf2b02a6c
1 changed files with 8 additions and 3 deletions

View File

@ -26,10 +26,15 @@ func (e RadosError) Error() string {
return fmt.Sprintf("rados: ret=%d, %s", errno, s)
}
var RadosAllNamespaces = C.LIBRADOS_ALL_NSPACES
var (
// RadosAllNamespaces is used to reset a selected namespace to all namespaces. See the IOContext SetNamespace function.
RadosAllNamespaces = C.LIBRADOS_ALL_NSPACES
var RadosErrorNotFound = RadosError(-C.ENOENT)
var RadosErrorPermissionDenied = RadosError(-C.EPERM)
// RadosErrorNotFound indicates a missing resource.
RadosErrorNotFound = RadosError(-C.ENOENT)
// RadosErrorPermissionDenied indicates a permissions issue.
RadosErrorPermissionDenied = RadosError(-C.EPERM)
)
func getRadosError(err int) error {
if err == 0 {