Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing PostgreSQL driver import in Go tutorial #21704

Closed
1 task done
kazuyainoue0124 opened this issue Jan 1, 2025 · 1 comment
Closed
1 task done

Missing PostgreSQL driver import in Go tutorial #21704

kazuyainoue0124 opened this issue Jan 1, 2025 · 1 comment
Labels
area/guides status/needs-more-info Need more information about the issue/PR status/triage Needs triage

Comments

@kazuyainoue0124
Copy link

Is this a docs issue?

  • My issue is about the documentation content or website

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:

import _ "github.com/lib/pq"

sql.Open("postgres", ...) fails with sql: unknown driver "postgres" (forgotten import?), causing the container to never listen on the port. This leads to curl: (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

  1. Add import _ "github.com/lib/pq" in the example code, or
  2. Clearly document that _ "github.com/lib/pq" must be used when connecting to PostgreSQL or CockroachDB.

Thank you for your work on the docs.

@kazuyainoue0124 kazuyainoue0124 added the status/triage Needs triage label Jan 1, 2025
@dvdksn
Copy link
Contributor

dvdksn commented Jan 13, 2025

I stepped through the tutorial but I'm not seeing that issue. What am I missing?

@craig-osterhout craig-osterhout added the status/needs-more-info Need more information about the issue/PR label Feb 10, 2025
@craig-osterhout craig-osterhout closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/guides status/needs-more-info Need more information about the issue/PR status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants