Missing PostgreSQL driver import in Go tutorial #21704
Labels
area/guides
status/needs-more-info
Need more information about the issue/PR
status/triage
Needs triage
Is this a docs issue?
Type of issue
Information is incorrect
Description
In the Use containers for Go development tutorial, the code sample omits the explicit import for the PostgreSQL driver. Without:
sql.Open("postgres", ...)
fails withsql: unknown driver "postgres" (forgotten import?)
, causing the container to never listen on the port. This leads tocurl: (52) Empty reply from server
and no helpful logs unless the user explicitly adds logging in the retry loop.Location
https://docs.docker.com/guides/golang/develop/
Suggestion
Either
_ "github.com/lib/pq"
must be used when connecting to PostgreSQL or CockroachDB.Thank you for your work on the docs.
The text was updated successfully, but these errors were encountered: