[go-nuts] go test -coverpkg=$LIST ... failing with exit code

2024-03-12 Thread 'TheDiveO' via golang-nuts
Dear Gophers, I'm struggling with "go test -coverpkg=XXX ... ./... -args -test.gocoverdir" returning non-zero exit codes, albeit all tests are passing. It might well be that I'm not really yet understanding how "go test -coverpkg=" is supposed to work. As illustrated below, I don't want to

[go-nuts] Re: range-over-func has two more alloc than direct-call-func Why?

2024-03-12 Thread peterGo
qiulaidongfeng, -gcflags=-m=2 peter On Tuesday, March 12, 2024 at 7:06:21 AM UTC-4 qiulaidongfeng wrote: > For the following code > > > https://go.dev/play/p/ynn7ihKXrp0?v=gotip > > > I got the benchmark > > > BenchmarkBelow3-16 9523 147772 ns/op 17 B/op 2 allocs/op > >

[go-nuts] range-over-func has two more alloc than direct-call-func Why?

2024-03-12 Thread 'qiulaidongfeng' via golang-nuts
For the following code https://go.dev/play/p/ynn7ihKXrp0?v=gotip I got the benchmark BenchmarkBelow3-16 9523 147772 ns/op 17 B/op 2 allocs/op BenchmarkBelow3direct-16 1 107335 ns/op 0 B/op 0 allocs/op range-over-func has two more alloc than direct-call-func. Why? -- You received