factory

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sequence

func Sequence(prefix string) string

Types

type Factory

type Factory[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](defaults func() T) *Factory[T]

func (*Factory[T]) AfterBuild

func (f *Factory[T]) AfterBuild(fn func(*T)) *Factory[T]

func (*Factory[T]) Build

func (f *Factory[T]) Build(overrides ...func(*T)) T

func (*Factory[T]) Create

func (f *Factory[T]) Create(t testing.TB, db *sql.DB, overrides ...func(*T)) T

Jump to

Keyboard shortcuts

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