close db connections explicitly

without this, sqlite3 was running out of file handles.
trunk
vilmibm 2023-07-18 06:37:56 +00:00
parent 0551fe3ff5
commit ef2516fd4d
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ func main() {
c.String(http.StatusInternalServerError, "oh no.") c.String(http.StatusInternalServerError, "oh no.")
return return
} }
defer db.Close()
id, err := rand.Int(rand.Reader, randMax) id, err := rand.Int(rand.Reader, randMax)
if err != nil { if err != nil {