Skip to content

docs: use 'go build .' in getting-started tutorials - #4565

Merged
kyleconroy merged 1 commit into
mainfrom
claude/sqlc-issue-4554-tdiuro
Aug 18, 2026
Merged

docs: use 'go build .' in getting-started tutorials#4565
kyleconroy merged 1 commit into
mainfrom
claude/sqlc-issue-4554-tdiuro

Conversation

@kyleconroy

Copy link
Copy Markdown
Collaborator

Fixes #4554

The getting-started tutorials tell readers to run go build ./... after fetching the database driver. In the tutorial layout the pattern matches two packages — the root main package and the generated tutorial package — and when go build is given more than one package it compiles them as a check but discards the resulting binaries, so no executable is produced.

Switching to go build . builds just the main package and writes the binary, which is what the tutorials intend ("The program should compile without errors, and run successfully").

The issue reports the SQLite tutorial, but the MySQL and PostgreSQL tutorials share the same layout and instruction, so all three are updated:

  • docs/tutorials/getting-started-sqlite.md
  • docs/tutorials/getting-started-mysql.md
  • docs/tutorials/getting-started-postgresql.md

Verified by reproducing the behavior in a minimal module with the same layout: go build ./... leaves no binary; go build . writes it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FdtZb2F2AHRqAypxKhbTHn


Generated by Claude Code

'go build ./...' matches both the main package and the generated
package, and Go discards the resulting binaries when building more
than one package, so the tutorial step produced no executable.
Building the single main package with 'go build .' writes the binary
as the tutorials intend.

Fixes #4554

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FdtZb2F2AHRqAypxKhbTHn
@kyleconroy
kyleconroy merged commit 1fef124 into main Aug 18, 2026
8 of 9 checks passed
@kyleconroy
kyleconroy deleted the claude/sqlc-issue-4554-tdiuro branch August 18, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example with sqlite in Go: build produces no output

2 participants