Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except AI was correct this time.

"It is rare to Close a DB, as the DB handle is meant to be long-lived and shared between many goroutines."

source: https://pkg.go.dev/database/sql#DB.Close



No. That was the reply after I corrected it, as in it originally told me to call Close after every *sql.DB handle.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: