Documentation
¶
Overview ¶
Package generator produces the explicit registry file for Go migrations, so that GoForge never has to parse or interpret .go migration files at runtime: `goforge generate` does the (static, source-level) discovery once, and the resulting file is plain Go the project compiles normally.
Index ¶
Constants ¶
const OutputFileName = "goforge_registry_gen.go"
OutputFileName is the generated registry's fixed name, so `goforge generate` can find and overwrite it, and skip it when scanning for migration source files.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate scans dir for Go migration files named "000001_create_users.go" (the convention `goforge make:migration --go` produces, pairing a migration%06d type with its filename) and writes the registry file that registers each one with migration.Registry, checksummed from the file's contents at generation time.
Types ¶
This section is empty.