close db connections explicitly
without this, sqlite3 was running out of file handles.trunk
parent
0551fe3ff5
commit
ef2516fd4d
1
main.go
1
main.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue