I intentionally stopped the database after successfully launching my Go program to test the behavior of sql.DB.Ping().
sql.Open is being called in init()
Much to surprise, sql.DB.Ping() did not return an error when my program called it before calling sql.DB.Query().
Why am I doing this? Just trying to write robust code. Checking the integrity of the DB connection only at startup may not be sufficient for a long-lived production web application.