SQLite best practices for Go — WAL mode, foreign_keys, busy_timeout, SetMaxOpenConns, context-aware queries, transactions, migrations
98
99%
Does it follow best practices?
Impact
97%
2.36xAverage score across 5 eval scenarios
Passed
No known issues
A developer is building a simple URL shortener service in Go with SQLite for persistence. The service should handle moderate traffic (a few hundred requests per minute) and run as a single binary with no external dependencies.
The service needs to support:
Each URL has: id, short_code (unique), original_url, click_count (default 0), created_at, last_accessed_at.
The click counter update on redirect must be efficient since it happens on every redirect request.
Produce:
main.go -- HTTP server with routesdb.go -- Database setup and migrationsstore.go -- URL storage operationshandlers.go -- HTTP handlers for all endpointsgo.mod -- Module fileThe code should be complete Go with no placeholders or TODO comments.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
sqlite-go-best-practices
verifiers