rados: naming conventions: fixes in Write function

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

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 396e8f32ff
commit b7b21273e3
1 changed files with 3 additions and 3 deletions

View File

@ -137,15 +137,15 @@ func (ioctx *IOContext) Create(oid string, exclusive CreateOption) error {
// Write writes len(data) bytes to the object with key oid starting at byte // Write writes len(data) bytes to the object with key oid starting at byte
// offset offset. It returns an error, if any. // offset offset. It returns an error, if any.
func (ioctx *IOContext) Write(oid string, data []byte, offset uint64) error { func (ioctx *IOContext) Write(oid string, data []byte, offset uint64) error {
c_oid := C.CString(oid) coid := C.CString(oid)
defer C.free(unsafe.Pointer(c_oid)) defer C.free(unsafe.Pointer(coid))
dataPointer := unsafe.Pointer(nil) dataPointer := unsafe.Pointer(nil)
if len(data) > 0 { if len(data) > 0 {
dataPointer = unsafe.Pointer(&data[0]) dataPointer = unsafe.Pointer(&data[0])
} }
ret := C.rados_write(ioctx.ioctx, c_oid, ret := C.rados_write(ioctx.ioctx, coid,
(*C.char)(dataPointer), (*C.char)(dataPointer),
(C.size_t)(len(data)), (C.size_t)(len(data)),
(C.uint64_t)(offset)) (C.uint64_t)(offset))