// Articles
Guides, tutorials, and comparisons to help you build better backend applications.
Useful resources for building Go applications.
A handy reference for common operations with Go modules
Connecting Go to Amazon RDS for PostgreSQL with pgx: the connection string, TLS with the RDS certificate bundle, pool sizing against max_connections, IAM database authentication tokens, network setup, and an approach where the database is provisioned from the Go code.
Set up sqlc for a Go service on Postgres: config, schema from migrations, query annotations, optional filters, transactions, and wiring the generated code to a managed database.
How GORM and sqlc model tables, write queries, handle migrations and transactions, and where each one fits in a Go backend on Postgres.
Send, receive and delete SQS messages with the AWS SDK for Go v2, with long polling, visibility timeouts, batch deletes, dead-letter queues and a graceful consumer loop.
Push live order updates to browsers from a Go backend with coder/websocket or gorilla/websocket, including origin checks, cookie auth, pings, slow-client handling and fan-out across more than one instance.
How HTTP middleware works in Go, how to write request ID, logging and panic recovery middleware for net/http, in which order to chain them, and how Encore middleware targets endpoints by tag and reads auth data.
How to pass dependencies into Go services so they are easy to test: plain constructors, interfaces for fakes, Uber's Fx container, what happened to Google Wire, and Encore service structs with initService.
Run a Go Fiber v3 API on Cloud Run with Cloud SQL in your own GCP account, with Encore or with a Dockerfile, the Cloud SQL connector and gcloud by hand.
Run scheduled jobs next to a standard library ServeMux API, such as expiring stock holds and a nightly sales snapshot, with Encore cron jobs, robfig/cron or EventBridge Scheduler.
Keep a webhook HMAC key and a carrier API token out of a standard library net/http repository, with Encore secrets set per environment or with .env files and AWS Secrets Manager on ECS.
Let a standard library ServeMux issue signed upload and download URLs for private invoice PDFs, using Encore on S3 or Cloud Storage, or the AWS SDK by hand.
Publish an order-placed event from a standard library ServeMux handler and process it in idempotent subscribers, using Encore on SNS and SQS or GCP Pub/Sub, or the AWS SDK by hand.