[go-nuts] Help getting database/sql pooling merged

2021-10-22 Thread Steven Hartland
There's been a long standing bug in database/sql pooling which means SetConnMaxIdleTime doesn't work. I found and fixed the bug back in June of 2020, but have so far been unable to get this relatively

Re: [go-nuts] initialization loop ?

2021-10-22 Thread Ian Lance Taylor
On Fri, Oct 22, 2021 at 11:38 AM Elemer Pixard wrote: > > This should be possible, because the slice simply contains the address of the > function. > Why the compiler cares what the function will be doing when called ? > Equivalent code will work in several other languages. The rules for when

Re: [go-nuts] initialization loop ?

2021-10-22 Thread Elemer Pixard
This should be possible, because the slice simply contains the address of the function. Why the compiler cares what the function will be doing when called ? Equivalent code will work in several other languages. On Friday, October 22, 2021 at 2:59:36 PM UTC-3 Jan Mercl wrote: > testSlice

Re: [go-nuts] initialization loop ?

2021-10-22 Thread Jan Mercl
testSlice mentions printLen, printLen mentions testSlice. The specification explicitly forbids such init cycles. On Fri, 22 Oct 2021, 19:51 dana...@gmail.com, wrote: > Why do I get an initialization loop in the following program? > > ```go > package main > import "fmt" > var testSlice =

[go-nuts] initialization loop ?

2021-10-22 Thread dana...@gmail.com
Why do I get an initialization loop in the following program? ```go package main import "fmt" var testSlice = []func(){printLen} func printLen() { fmt.Print(len(testSlice)) } func main() { printLen() } ``` Playground Link: https://play.golang.org/p/tJenMMaWex6 Using go1.17.2 -- You