Help us shape the future of Go! Take the 2026 Go Developer Survey

gen

command
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command gen renders the blog schema as the plain `schema.sql` that sqlc reads, which is the mechanical half of the sqlb/sqlc pairing story: one schema declaration, two consumers.

go generate ./example/withsqlc/...     regenerate
go run ./example/withsqlc/gen -check   fail if the committed output is stale

The -check mode is what makes the claim more than prose. If someone edits blogschema and does not regenerate, sqlc is reading a schema the database no longer has, and the gate says so.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL