News for hackers. Stuff that matters.
Re:Don't trust default timeouts by adamch on Saturday August 29, 2020 @09:15AM (#24315854)
We kept running into this issue at my job. A lot of our original database queries for our Go service called db.QueryRow, not db.QueryRowContext. The former doesn't respect timeouts, the latter does. So I ended up writing my own wrapper around Go's database/sql package. It basically just reexports all the functions that accept Context and hides the ones that don't. Very helpful. Timeouts are important.

There are no comments on this comment yet.