scaffold

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package scaffold generates blit boilerplate for a given package path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// PkgPath is the import path or directory path of the package under test.
	PkgPath string
	// Component is an optional component type name. When non-empty the
	// boilerplate is tailored to that type.
	Component string
}

Options controls the output of Generate.

type Result

type Result struct {
	// FileName is the suggested file name (not the full path).
	FileName string
	// Content is the gofmt-formatted Go source.
	Content []byte
}

Result holds the generated file content and the suggested output path.

func Generate

func Generate(opts Options) (*Result, error)

Generate produces a _test.go file with btest.NewTestModel boilerplate. The generated source passes go vet immediately.

Jump to

Keyboard shortcuts

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