On Friday, March 29, 2019 at 11:08:06 AM UTC+13, Ashutosh Baghel wrote: > > Hi folks, > > I am new to Go-Programming and having the following requirement, I need > to have Array of Strings,(for example names) at my 'Go Side' . > > But i would get this names from my C library API which i have included in > my Go program. > > Note: I have liberty to modify the C library too, i could control the > return type. > > Please help with this. >
Here is an example from one of my projects using cgo as a binding to a C++ library: C string array to Go https://github.com/justinfx/openimageigo/blob/master/imagespec.go#L387 Go string slice to C https://github.com/justinfx/openimageigo/blob/master/imagespec.go#L402 There are other approaches besides this one. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
