The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Package dbtest gives tests an isolated, fully-migrated PostgreSQL database
with no external server to run. It starts one embedded server per test binary,
migrates a template once, and hands each test a fresh database cloned from
that template — real commits and all, so concurrency behaviour (advisory
locks, transactions) is exercised exactly as in production.
Use it from a test package like:
func TestMain(m *testing.M) { dbtest.Main(m) }
func TestThing(t *testing.T) {
db := dbtest.New(t)
// ... db is a clean, migrated *pgxpool.Pool; dropped when the test ends
}
Main runs a package's tests against the shared embedded server and stops it
afterward. Test packages that use New call this from TestMain so the server
process and its data directory are cleaned up when the binary exits.
New returns a fresh, isolated, fully-migrated database for the calling test and
registers its teardown. Each call clones the shared template, so tests neither
see each other's data nor re-run migrations.