From 5cf2b02a6c984fab82c49b22cc10bb8fe88e417f Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 22 Jan 2020 14:28:26 -0500 Subject: [PATCH] rados: clean up var lines in rados.go and add doc comments Signed-off-by: John Mulligan --- rados/rados.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rados/rados.go b/rados/rados.go index 28742ef..e23e8c0 100644 --- a/rados/rados.go +++ b/rados/rados.go @@ -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 {