[go-nuts] memory issues

2023-02-08 Thread James Dornan
I have a go web service that acts as a proxy that gets XML documents from a remote system and processes them through XSLT, returning the result, if any. I have tried a number of options over the last few days and cannot seem to nail down the cause. Does anyone know how to address this or debug

Re: [go-nuts] loadinternal: cannot find runtime/cgo

2023-02-08 Thread Ian Lance Taylor
On Wed, Feb 8, 2023 at 11:50 AM Paolo Losi wrote: > > I am using the following command to build command to build statically linked > executables > > go install -tags netgo,osusergo -v -ldflags="-extldflags '-static' -linkmode > 'external'" ./... > > Everything works fine (binaries are build and

[go-nuts] loadinternal: cannot find runtime/cgo

2023-02-08 Thread Paolo Losi
I am using the following command to build command to build statically linked executables go install -tags netgo,osusergo -v -ldflags="-extldflags '-static' -linkmode 'external'" ./... Everything works fine (binaries are build and work correctly) but I get this warning: loadinternal: cannot f

[go-nuts] Re: Trying to load DLL generated with CGO reflectively, stuck on WaitForSingleObject

2023-02-08 Thread Jason E. Aten
Just a wild guess, no idea if this will help, but you might try doing runtime.LockOSThread() in an init() function in your go program, and then try only using that "main" Goroutine thread to do the work. This is necessary for some graphics/gui stuff like SDL to work, for example. https://github.

Re: [go-nuts] extract VCS branch name used during build

2023-02-08 Thread quin...@gmail.com
Thanks for the ideas all, I think go embed is the best path for me. runtime/debug will give me the revision but sadly it can't give me the branch. I want the branch as we run a microservice architecture and seeing that all the microservices are running the release branch and not master (or mai

[go-nuts] Re: Drain channel on demand without busy looping?

2023-02-08 Thread Andreas Götz
Thanks Jason, that is absolutely beautiful. Ranging over channel wont work when the channel remains open (my case), but the "callback" pattern is really nice. Much appreciated, Andi On Wednesday, February 8, 2023 at 2:38:28 AM UTC+1 Jason E. Aten wrote: > > I have the requirement of make sure