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 <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-06-28 11:08:18 -04:00 committed by John Mulligan
parent f4a114fdd6
commit c27c941bef
1 changed files with 4 additions and 4 deletions

View File

@ -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.