From b9ba32f8b5177fd2648581dd77b7957822609d35 Mon Sep 17 00:00:00 2001 From: XingQiang Bai Date: Fri, 26 Jul 2024 10:18:20 +0800 Subject: [PATCH] fix go wrapper callback interface not []byte (#228) --- bindings/go/csdk/csdk_wrapper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/go/csdk/csdk_wrapper.go b/bindings/go/csdk/csdk_wrapper.go index 5d5edbe6d..5956a7e70 100644 --- a/bindings/go/csdk/csdk_wrapper.go +++ b/bindings/go/csdk/csdk_wrapper.go @@ -119,6 +119,7 @@ func on_callback_once(resp *C.struct_bcos_sdk_c_struct_response) { var respData Response if int(resp.error) != 0 { respData.Err = fmt.Errorf("something is wrong, error: %d, errorMessage: %s", resp.error, C.GoString(resp.desc)) + respData.Result = []byte{} } else { respData.Result = C.GoBytes(unsafe.Pointer(resp.data), C.int(resp.size)) }