codegen

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(project *types.Project, opts Options) ([]byte, error)

Generate produces a Go source file that builds the given compose project using go-contain.

Types

type Options

type Options struct {
	// PackageName is the Go package name for the generated file (e.g. "main").
	PackageName string
	// EmitMain, if true, generates a func main() that creates the project and runs compose.Up.
	EmitMain bool
	// ProjectName overrides the compose project name in generated code. If empty, the loaded project name is used.
	ProjectName string
	// Profiles, if non-empty, are passed to Up/Down in the generated main so only services with these profiles run.
	Profiles []string
}

Options configures code generation.

Jump to

Keyboard shortcuts

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