Registry / database / fergusstrange-embedded-postgres

fergusstrange-embedded-postgres

JSON →
library1.34.0gogounverified

Package embeddedpostgres provides a way to run a real PostgreSQL database programmatically within Go tests or applications.

go get github.com/fergusstrange/embedded-postgres
INSTALL
IMPORT
SIG · FERGUSSTRANGE-EMBE
F
fergusstrange-embedded-postgres
databasegov1.34.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

embeddedpostgres
✓ github.com/fergusstrange/embedded-postgres

Start an embedded PostgreSQL server

package main import ( "fmt" "github.com/fergusstrange/embedded-postgres" ) func main() { postgres, _ := embeddedpostgres.NewPostgres() _ = postgres.Start() defer postgres.Stop() fmt.Println("PostgreSQL started on", postgres.Port()) }
Debug
Known issues
gotchaEmbedded Postgres downloads and runs a real PostgreSQL binary; ensure the host system has compatible libraries.
fix
Set environment variables like EMBEDDED_POSTGRES_BINARY to control binary location.
affects: *
Upgrade
Version history
1.34.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Resources
fergusstrange-embedded-postgres — go get fergusstrange-embedded-postgres · libregistry