Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile/bind: byte slice parameter support without copy #12113
When a Go function or method taking a byte slice is called, the current implementation
Instead, I propose to pass a slice backed by the foreign language's byte array if possible.
Users who want to keep the slice for later use have to be aware of the limitation and somehow
More discussion on automation or tool support to detect such use cases
I created a golang function with returntype array
my golang function is
and after this i run the bind command it generate the framework and show header file with following result.
Gomobile does not (yet) support binding to function that takes or returns slices or arrays. If you need access to a Go slice or array from native code, use something like:
Please use the golang-nuts discussion group for support questions in the future: