Build HTTP and database integrations
6 articles
-
Build HTTP and database integrations
How to Commit or Roll Back a Go `database/sql` Transaction Safely
Run every operation through one `sql.Tx`, stop on the first error, and treat a successful `Commit` as the point where the work succeeds.
-
Build HTTP and database integrations
Insert Rows with Go database/sql and Retrieve Generated IDs
Pass INSERT values separately to ExecContext, then retrieve a generated ID only after checking the execution error.
-
Build HTTP and database integrations
Scan Database Rows into Go Values with `database/sql`
Scan selected columns into matching Go destinations, preserve SQL NULL with nullable types, and check errors throughout row iteration.
-
Build HTTP and database integrations
Build a Go HTTP Server with a Custom ServeMux and Middleware
Register routes on a private mux, wrap it with middleware, and pass the wrapped handler to an explicitly configured HTTP server.
-
Build HTTP and database integrations
Download a URL to a File in Go: Check HTTP Errors and Avoid Partial Output
Stream an HTTP response to a caller-chosen path without saving error pages or leaving a partial download at that path.
-
Build HTTP and database integrations
Go 1.27 UUIDs: What to Check Before Dropping google/uuid
Go 1.27 is reported to add UUID generation and parsing, but replacing a dependency still requires checking the final package API and your supported toolchains.






