gen

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package gen wires loading, parsing, resolving, and code generation into a single operation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphPlan

type GraphPlan struct {
	Graph *model.Graph
	Plan  *resolve.Plan
}

GraphPlan pairs a parsed graph with its resolved build plan.

func Inspect

func Inspect(opts Options) ([]GraphPlan, error)

Inspect loads the selected packages and returns every declared graph with its resolved plan, without generating code.

type Options

type Options struct {
	// Dir is the working directory for package patterns.
	Dir string
	// Patterns are package patterns such as ./... or ./cmd/server.
	Patterns []string
	// LoomPath is the loom package import path.
	LoomPath string
	// DryRun generates without writing files.
	DryRun bool
}

Options configures a generation run.

type Result

type Result struct {
	Package string
	File    string
	Graphs  []string
	// Infos describes implicit interface bindings; display on every generate run.
	Infos   []string
	Changed bool
	Source  []byte
}

Result reports what happened to one package.

func Run

func Run(opts Options) ([]Result, error)

Run generates code for every package matched by the options.

Jump to

Keyboard shortcuts

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