Skip to content

Commit 26aec94

Browse files
committed
docs: use 'go build .' in getting-started tutorials
'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
1 parent 537ffa7 commit 26aec94

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/tutorials/getting-started-mysql.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Before this code will compile you'll need to fetch the relevant MySQL driver:
169169

170170
```shell
171171
go get github.com/go-sql-driver/mysql
172-
go build ./...
172+
go build .
173173
```
174174

175175
The program should compile without errors. To make that possible, sqlc generates

‎docs/tutorials/getting-started-postgresql.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ package, but in this tutorial we've used `pgx/v5`:
188188

189189
```shell
190190
go get github.com/jackc/pgx/v5
191-
go build ./...
191+
go build .
192192
```
193193

194194
The program should compile without errors. To make that possible, sqlc generates

‎docs/tutorials/getting-started-sqlite.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Before this code will compile you'll need to fetch the relevant SQLite driver:
190190

191191
```shell
192192
go get modernc.org/sqlite
193-
go build ./...
193+
go build .
194194
```
195195

196196
The program should compile without errors, and run successfully. To make that

0 commit comments

Comments
 (0)