faker

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package faker generates realistic fake data for factories and seeders. Dependency-free; uses math/rand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool() bool

Bool returns a random boolean.

func Email

func Email() string

Email returns a random email address.

func FirstName

func FirstName() string

FirstName returns a random first name.

func Float

func Float(min, max float64) float64

Float returns a random float in [min, max].

func Int

func Int(min, max int) int

Int returns a random int in [min, max].

func LastName

func LastName() string

LastName returns a random last name.

func Name

func Name() string

Name returns a random full name.

func Paragraph

func Paragraph() string

Paragraph returns several sentences.

func Sentence

func Sentence() string

Sentence returns a capitalized sentence.

func Time

func Time() time.Time

Time returns a random recent time.

func UUID

func UUID() string

UUID returns a random v4-ish UUID string.

func Word

func Word() string

Word returns a single random word.

func Words

func Words(n int) string

Words returns n random words joined by spaces.

Types

This section is empty.

Jump to

Keyboard shortcuts

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