[go-nuts] pprof CPU profiles missing inlined frames

2024-02-15 Thread Prashant V
Is it expected that CPU profiles taken with pprof don't include inlined frames? With a simple repro , when the `double` function has `go:noinline`, then the pprof shows the double function as expected, 3.34s 67.07% 67.07% 4.98s 100% main.main

[go-nuts] Need help to close/shutdown http server when underlying socket fd explicitly bind used

2024-02-15 Thread Bing
Hi, I'm trying to implement a http server and I need to bind the underlying socket to a specific VRF instance so that the server only listens on that VRF instance. When some specific event happens, the program needs to shutdown the http server. I'm using syscall.SetsockoptString() and option

Re: [go-nuts] Re: Range over int

2024-02-15 Thread Jorge Massih
Hey folks! Now in in Go v1.22 (released 02-06-2024) it's possible to iterate over a range of integers by doing the approach mentioned at the beginning of this conversation. - JM El miércoles, 7 de enero de 2015 a la(s) 9:42:07 p.m. UTC-4, Sean Russell

[go-nuts] remove pre-1.22 cruft

2024-02-15 Thread Amnon
Now that 1.22 is out, is there an easy way to remove pre-1.22 cruft, like x := x assignments inside loops. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email

[go-nuts] Re: Trying to understand aversion to main package

2024-02-15 Thread 'Brian Candler' via golang-nuts
On Thursday 15 February 2024 at 00:08:44 UTC Jerry Londergaard wrote: If code is outside of the main function but still in the main package, it seems its testable like other functions? Yes indeed. I suspect though if one is putting tests in package main_test, then I guess you can't import

Re: [go-nuts] XML Canonicalization and signing

2024-02-15 Thread Karlovsky Alexey
It's a strange task, because for xml there is a XMLDSIG standard for signing XML documents. I recommend trying https://github.com/russellhaering/goxmldsig for this. If XMLDSig is not suitable and you definitely want to create a digital signature of an xml - you should think about xml normalization