rados: naming conventions: c_name -> cName

Fix up variable names that don't meet Go standards.

Command: gofmt -w -r "c_name -> cName" rados/conn.go

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-06-21 16:14:25 -04:00 committed by John Mulligan
parent cc08cab257
commit d7f73e112d
1 changed files with 9 additions and 9 deletions

View File

@ -261,9 +261,9 @@ func (c *Conn) GetInstanceID() uint64 {
// MakePool creates a new pool with default settings.
func (c *Conn) MakePool(name string) error {
c_name := C.CString(name)
defer C.free(unsafe.Pointer(c_name))
ret := C.rados_pool_create(c.cluster, c_name)
cName := C.CString(name)
defer C.free(unsafe.Pointer(cName))
ret := C.rados_pool_create(c.cluster, cName)
return getError(ret)
}
@ -272,9 +272,9 @@ func (c *Conn) DeletePool(name string) error {
if err := c.ensure_connected(); err != nil {
return err
}
c_name := C.CString(name)
defer C.free(unsafe.Pointer(c_name))
ret := C.rados_pool_delete(c.cluster, c_name)
cName := C.CString(name)
defer C.free(unsafe.Pointer(cName))
ret := C.rados_pool_delete(c.cluster, cName)
return getError(ret)
}
@ -283,9 +283,9 @@ func (c *Conn) GetPoolByName(name string) (int64, error) {
if err := c.ensure_connected(); err != nil {
return 0, err
}
c_name := C.CString(name)
defer C.free(unsafe.Pointer(c_name))
ret := int64(C.rados_pool_lookup(c.cluster, c_name))
cName := C.CString(name)
defer C.free(unsafe.Pointer(cName))
ret := int64(C.rados_pool_lookup(c.cluster, cName))
if ret < 0 {
return 0, radosError(ret)
}