Open suzhengda opened 1 month ago
$ go generate 2024/10/10 18:16:20 flutter-go-bridge generator 2024/10/10 18:16:22 Parsing 2024/10/10 18:16:22 - Package github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback 2024/10/10 18:16:22 - File F:\1024\flutter_openim_sdk\openim-sdk-core-3\open_im_sdk_callback\callback_client.go 2024/10/10 18:16:22 - File F:\1024\flutter_openim_sdk\openim-sdk-core-3\open_im_sdk_callback\callback_go_sdk.go 2024/10/10 18:16:22 Processing 2024/10/10 18:16:22 - Type Base 2024/10/10 18:16:22 ast contained unexpected data: unexpected type *ast.InterfaceType: &{5772478 0xc00029c600 false} exit status 1 callback_client.go:15: running "go": exit status 1
exemple:
type Base interface { OnError(errCode int32, errMsg string) OnSuccess(data string) }
Hi, this is expected as the generator currently doesn't support interfaces. An alternative would be to use static functions where possible.
$ go generate 2024/10/10 18:16:20 flutter-go-bridge generator 2024/10/10 18:16:22 Parsing 2024/10/10 18:16:22 - Package github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback 2024/10/10 18:16:22 - File F:\1024\flutter_openim_sdk\openim-sdk-core-3\open_im_sdk_callback\callback_client.go 2024/10/10 18:16:22 - File F:\1024\flutter_openim_sdk\openim-sdk-core-3\open_im_sdk_callback\callback_go_sdk.go 2024/10/10 18:16:22 Processing 2024/10/10 18:16:22 - Type Base 2024/10/10 18:16:22 ast contained unexpected data: unexpected type *ast.InterfaceType: &{5772478 0xc00029c600 false} exit status 1 callback_client.go:15: running "go": exit status 1
exemple:
type Base interface { OnError(errCode int32, errMsg string) OnSuccess(data string) }