// the find
mattn/go-sqlite3
sqlite3 driver for go using database/sql
The de-facto standard SQLite driver for Go, wrapping the SQLite amalgamation via CGO and implementing the database/sql interface. It's what you reach for when you want SQLite in a Go project and don't want to think about it — nine thousand stars and over a decade of production use back that up.
CGO wrapping the SQLite amalgamation means you get the real SQLite, not a reimplementation, so every SQLite feature and pragma works. The build-tag system for optional extensions (FTS5, ICU, JSON, virtual tables, preupdate hooks) is clean — you opt in at compile time rather than carrying dead code. The DSN is expressive enough to configure WAL mode, busy timeouts, foreign key enforcement, and cache sharing without writing any Go code. The examples directory covers non-obvious use cases like custom functions, hooks, virtual tables, and serialization.
CGO is a hard dependency, which breaks pure-Go cross-compilation workflows and adds a C toolchain requirement that catches people off guard in CI (especially Alpine containers and Windows). Concurrent write access is genuinely problematic — the FAQ admits you need SetMaxOpenConns(1) for writable databases, which means you've traded connection pooling for correctness. The user authentication module is deprecated but still documented, which is confusing for anyone reading the README. In-memory databases and connection pool interaction is a sharp edge that burns people regularly (the ':memory:' vs 'file::memory:?cache=shared' distinction is buried in the FAQ, not surfaced where you actually open a connection).