rados: naming conventions: fixes in Read 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 64bfa59378
commit 4dc59eed6a
1 changed files with 3 additions and 3 deletions

View File

@ -182,8 +182,8 @@ func (ioctx *IOContext) Append(oid string, data []byte) error {
// Read reads up to len(data) bytes from the object with key oid starting at byte // Read reads up to len(data) bytes from the object with key oid starting at byte
// offset offset. It returns the number of bytes read and an error, if any. // offset offset. It returns the number of bytes read and an error, if any.
func (ioctx *IOContext) Read(oid string, data []byte, offset uint64) (int, error) { func (ioctx *IOContext) Read(oid string, data []byte, offset uint64) (int, error) {
c_oid := C.CString(oid) coid := C.CString(oid)
defer C.free(unsafe.Pointer(c_oid)) defer C.free(unsafe.Pointer(coid))
var buf *C.char var buf *C.char
if len(data) > 0 { if len(data) > 0 {
@ -192,7 +192,7 @@ func (ioctx *IOContext) Read(oid string, data []byte, offset uint64) (int, error
ret := C.rados_read( ret := C.rados_read(
ioctx.ioctx, ioctx.ioctx,
c_oid, coid,
buf, buf,
(C.size_t)(len(data)), (C.size_t)(len(data)),
(C.uint64_t)(offset)) (C.uint64_t)(offset))