generator

package
v0.0.0-...-c9e04f0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package generator pre-parses goql lambdas into a registry so a `-tags prod` binary can run them without reading its own source at runtime.

It is driven from your own module, because resolving a lambda's fields requires the models to be registered — which only happens when the packages declaring them are imported and their init() runs. Add a small program that imports your models and calls Run, then point go:generate at it:

//go:generate go run ./tools/goqlc .

See pkg/tools/goqlc in this repository for a working example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(dir string) error

Run scans dir for goql lambdas and writes a registry file into each package that contains them. Models must already be registered in this process.

Types

This section is empty.

Jump to

Keyboard shortcuts

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