generator

package
v0.1.1 Latest Latest
Warning

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

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

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

View Source
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

func Generate(dir string) error

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.

Jump to

Keyboard shortcuts

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