fake

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 6 Imported by: 0

README

Fake

  • RandomUUID: Generates a random UUID of version 4 and variant 2.

  • RandomDate: Generates a random date between 1st January 1970 and the current date.

  • RandomPhoneNumber: Generates a random US phone number in the format (XXX) XXX-XXXX.

  • RandomAddress: Generates a random US address including street, city, state, and ZIP code.

Examples:

For examples of each function, please checkout EXAMPLES.md


Documentation

Overview

Package fake provides utilities for generating fake data.

Index

Constants

View Source
const (
	EpochYear   = 1970
	EpochMonth  = 1
	EpochDay    = 1
	EpochHour   = 0
	EpochMinute = 0
	EpochSecond = 0
	EpochNano   = 0
)
View Source
const MaxStreetNumber = 150

Variables

This section is empty.

Functions

func RandomAddress

func RandomAddress() (string, error)

RandomAddress generates a random address.

func RandomDate

func RandomDate() (time.Time, error)

RandomDate generates a random date.

func RandomPhoneNumber

func RandomPhoneNumber() (string, error)

RandomPhoneNumber generates a random phone number.

func RandomUUID

func RandomUUID() (string, error)

RandomUUID generates a fake UUIDv4.

Types

This section is empty.

Jump to

Keyboard shortcuts

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