From c27c941befefa8cffc9e5ac7eb6bf5a17503216d Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Mon, 28 Jun 2021 11:08:18 -0400 Subject: [PATCH] rados: naming conventions: fixes in SetNamespace function Fix up variable names that don't meet Go standards. Command: gofmt -w -r "c_ns -> cns" rados/ioctx.go Signed-off-by: John Mulligan --- rados/ioctx.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rados/ioctx.go b/rados/ioctx.go index 95ebaa3..d3260a8 100644 --- a/rados/ioctx.go +++ b/rados/ioctx.go @@ -114,12 +114,12 @@ func (ioctx *IOContext) Pointer() unsafe.Pointer { // void rados_ioctx_set_namespace(rados_ioctx_t io, // const char *nspace); func (ioctx *IOContext) SetNamespace(namespace string) { - var c_ns *C.char + var cns *C.char if len(namespace) > 0 { - c_ns = C.CString(namespace) - defer C.free(unsafe.Pointer(c_ns)) + cns = C.CString(namespace) + defer C.free(unsafe.Pointer(cns)) } - C.rados_ioctx_set_namespace(ioctx.ioctx, c_ns) + C.rados_ioctx_set_namespace(ioctx.ioctx, cns) } // Create a new object with key oid.