Since the x/exp/maps era, I have used maps.Keys and maps.Values
extensively. They are very useful and avoid users from doing loop
iterations.
I remember that they were added to the standard library, but I used
maps.Keys in the latest go version and was surprised that it could not
compile.
Hi,
If you want a slice in lieu of an iterator, you can use the slices package and
its Collect function :
https://pkg.go.dev/slices#Collect
hth,
-a
Dec 24, 2024 05:08:01 fliter :
>
>
> Since the x/exp/maps era, I have used maps.Keys and maps.Values
> extensively. They are very useful and
Hi,
I need to use CGO to call a C function in a Go program, where the parameter
type is a void pointer. Now I need to pass a struct to the C function, and
the struct contains a channel. Additionally, I have a Go callback function
that the C function will call, using the data from this struct. Th
On Mon, Dec 23, 2024 at 8:29 AM 'Red' via golang-nuts
wrote:
>
> I need to use CGO to call a C function in a Go program, where the parameter
> type is a void pointer. Now I need to pass a struct to the C function, and
> the struct contains a channel. Additionally, I have a Go callback function