Closed elct9620 closed 3 months ago
The log.Fatal() will use os.Exit(1) and the defer never be called. To ensure the connection is closed, use log.Panic() instead.
log.Fatal()
os.Exit(1)
defer
log.Panic()
The
log.Fatal()
will useos.Exit(1)
and thedefer
never be called. To ensure the connection is closed, uselog.Panic()
instead.