The usual pattern is to have a global *sql.Db object obtained via calling
the Open() function as explained at [1]. You don't have to worry about
maintaining the connection pool yourselves as that's automatically done.
The Go tutorial on the topic [2] shows you can do this using a global
variabl
Hello All,
What is the appropriate and industry standard mechanism to send database
connection across golang file to use in logic layer to get data from DB? It
should be one time connection established and many time use the connection
pool across all files.
Thanks,
Shishira
--
You received t
Now my head is spinning:
interface{ int; m() } // int (but type set is empty because int
has no method m)
interface{ ~int; m() } // int (but type set is infinite because
there are many int types with method m)
On Saturday, 8 January 2022 at 02:32:35 UTC gri wrote:
> Indeed. Th