[go-nuts] When using cgo to generate Go structs, some fields are ignored in the definition.

2024-07-24 Thread 飞舟
I have a C struct, and when I use cgo to generate Go structs, some fields are being ignored. I’m using go version go1.21.1 linux/amd64, and here is my env. go env: GO111MODULE='on' GOARCH='amd64' GOBIN='' GOCACHE='/root/.cache/go-build' GOENV='/root/.config/go/env' GOEXE='' GOEXPERIMENT='' GO

[go-nuts] Re: When using cgo to generate Go structs, some fields are ignored in the definition.

2024-07-24 Thread peterGo
Repeat of post on Stack Overflow: https://stackoverflow.com/questions/78786971/why-do-some-fields-in-the-go-structs-generated-using-cgo-become-anonymous On Wednesday, July 24, 2024 at 8:29:39 AM UTC-4 飞舟 wrote: > I have a C struct, and when I use cgo to generate Go structs, some fields > ar

Re: [go-nuts] When using cgo to generate Go structs, some fields are ignored in the definition.

2024-07-24 Thread Ian Lance Taylor
On Wed, Jul 24, 2024 at 5:29 AM 飞舟 wrote: > > I have a C struct, and when I use cgo to generate Go structs, some fields are > being ignored. I’m using go version go1.21.1 linux/amd64, and here is my env. Please post code as plain text, rather than with a background. Plain text is much easier to

[go-nuts] Cogent Core, a cross-platform GUI framework in Go

2024-07-24 Thread Kai O'Reilly
Hello Gophers, Today we are announcing the initial public release of the Cogent Core GUI framework. Cogent Core allows you to build powerful, fast, elegant apps that run on all platforms with a single Go codebase, allowing you to Code Once, Run Everywhere (Core). We encourage you to check out o

Re: [go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-24 Thread Brendan Goldacker
Thanks everyone for the leads and resources. After a few more days hacking away and experimenting with changes I was able to get a solution that runs under 20s (see here ). Turns out GC wasn't a problem. Its was mostly issue

Re: [go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-24 Thread Ian Lance Taylor
On Wed, Jul 24, 2024 at 2:58 PM Brendan Goldacker wrote: > > I took a look over the channels code > . > I can't say I follow it 100%, but it seems like there is a circular buffer > which would be of si

Re: [go-nuts] Go 1BRC Challenge and GC Overhead

2024-07-24 Thread Brendan Goldacker
Sorry I was wrong. I posted a correction, but it as deleted for some reason. Channels do delete the element from the circular buffer on receive . So my conclusion was wrong. The reason for t

[go-nuts] about toolchain directive in go.mod?

2024-07-24 Thread xie cui
go.mod: module toolchain_test go 1.22.3 toolchain go1.25.0 main.go: package main func main() { println("Hello World!") } when run go build, I think that should try to download toolchain 1.25.0 which do not exist. So I expect that cmd should failed. But It run sucess. -- You received thi

[go-nuts] Re: about toolchain directive in go.mod?

2024-07-24 Thread 王旭东
Hi, Please refer to the Go toolchain selection section. go command consults the GOTOOLCHAIN env before making a decision. Thanks, Xudong 在2024年7月25日星期四 UTC+8 09:25:48 写道: >