fake

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fake provides generic test data generation utilities for creating fake instances of any type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFake

func BuildFake[X any]() (x *X, err error)

BuildFake builds a fake instance of the given type.

func BuildFakeForTest

func BuildFakeForTest[X any](t *testing.T) (x *X)

BuildFakeForTest builds a fake instance of the given type for a test, failing the test on error.

func BuildFakeTime

func BuildFakeTime() time.Time

BuildFakeTime builds a fake time.

func MustBuildFake

func MustBuildFake[X any]() X

MustBuildFake builds a fake instance of the given type, panicking on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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