Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect establishes a connection to the PostgreSQL database using the pgx driver. It retrieves the connection string from the DATABASE_URL environment variable, verifies the connection with a ping, and returns a *sql.DB instance.
It returns an error if the environment variable is missing, the driver fails to open, or the database ping fails.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.