generator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package generator executes code-generation templates against a parsed model to produce typed client libraries. It embeds all templates from the templates/ directory and writes generated Go source files to the specified output directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(pkg *model.Package, outputDir string, opts ...GenerateOption) error

Generate renders all code-generation templates against pkg and writes the resulting Go source files into outputDir. The directory must already exist.

Types

type GenerateOption added in v1.2.0

type GenerateOption func(*generateConfig)

GenerateOption configures code generation.

func WithCLIDir added in v1.2.0

func WithCLIDir(dir string) GenerateOption

WithCLIDir sets the output directory for the generated CLI main.go. When empty (the default), the CLI is generated at {outputDir}/cmd/{packageName}/main.go.

Jump to

Keyboard shortcuts

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