Open cphaensch opened 2 months ago
If your code does not build successfully, it is not ready for gobco.
Just as you need to run go test -vet=off
for your code to build, you need to run gobco -test -vet=off
to run gobco on it.
I don't see anything that gobco should do differently to support your case.
The code builds with Go 1.22.0, but does not build with goboco.
I changed the code from fmt.Sprint(f) to reflect.GetValue(f).Pointer() though, so it works now ;)
Sorry for prematurely closing this issue, now I understand it. I'll have to look into the details why gobco
fails but a plain go test
succeeds.
The thing is, the code is correct and should compile (and does compile on go 1.22.0). The result of fmt.Sprint(f) where f is a func() is a hex value identifying the closure like in: