render

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Render added in v1.7.0

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

Render manages template rendering for generating test code.

func New added in v1.7.0

func New() *Render

New creates a new Render instance with default templates and helper functions.

func (*Render) Header added in v1.7.0

func (r *Render) Header(w io.Writer, h *models.Header) error

Header renders the file header including package declaration and imports.

func (*Render) LoadCustomTemplates added in v1.7.0

func (r *Render) LoadCustomTemplates(dir string) error

LoadCustomTemplates allows to load in custom templates from a specified path.

func (*Render) LoadCustomTemplatesName added in v1.7.0

func (r *Render) LoadCustomTemplatesName(name string) error

LoadCustomTemplatesName allows to load in custom templates of a specified name from the templates directory.

func (*Render) LoadFromData added in v1.7.0

func (r *Render) LoadFromData(templateData [][]byte)

LoadFromData allows to load from a data slice

func (*Render) TestFunction added in v1.7.0

func (r *Render) TestFunction(
	w io.Writer,
	f *models.Function,
	printInputs bool,
	subtests bool,
	named bool,
	parallel bool,
	useGoCmp bool,
	params map[string]interface{},
	aiCases []interface{}) error

TestFunction renders a test function for the given function signature with the specified options.

Jump to

Keyboard shortcuts

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