Re: [go-nuts] Looking for a good a explanation on behaviour of cgo during go build vs go test.

2025-02-10 Thread Kurtis Rader
Just guessing but it is likely due to environment variables, such as LD_LIBRARY_PATH, present when you run your binary but not when you run "go test". Possibly because "go test" doesn't pass the env var to the code being tested. On Mon, Feb 10, 2025 at 10:48 AM Ullas HV wrote: > I recently ran i

[go-nuts] Looking for a good a explanation on behaviour of cgo during go build vs go test.

2025-02-10 Thread Ullas HV
I recently ran into a problem where go build (with cgo) was successfull but go test of a function reported an error stated below. "error while loading shared libraries: libtcmalloc.so.4: cannot open shared object file: No such file or directory exit status 127" -- You received this message

Re: [go-nuts] Fscan() eats 1st char in scanning values

2025-02-10 Thread 'Ivan Burak' via golang-nuts
>> Fscanln is when you want to scan *the entire line* in one go, and you know in advance exactly the right number of placeholders to capture. Yes, Brain. This means the documentation needs to be changed a bit, like the blue text in my previous message. And of course, my example of the fix is no