generator

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Overview

Package generator provides internal implementation for TOML to Go code generation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator handles the conversion of TOML config to Go code.

func New

func New(opts ...Option) *Generator

New creates a new Generator with the given options.

func (*Generator) Generate

func (g *Generator) Generate(tomlData []byte) ([]byte, error)

Generate parses TOML data and generates Go code.

type Option

type Option func(*Generator)

Option configures a Generator.

func WithEnvOverride

func WithEnvOverride(enable bool) Option

WithEnvOverride enables environment variable override support.

func WithInputDir added in v0.0.3

func WithInputDir(dir string) Option

WithInputDir sets the input directory for resolving relative file paths.

func WithMaxFileSize added in v0.0.3

func WithMaxFileSize(size int64) Option

WithMaxFileSize sets the maximum file size for file: references.

func WithMode added in v0.0.4

func WithMode(mode string) Option

WithMode sets the generation mode.

func WithPackageName

func WithPackageName(name string) Option

WithPackageName sets the package name for generated code.

Jump to

Keyboard shortcuts

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