Categorygithub.com/brianvoe/gofakeit
modulepackage
1.2.0
Repository: https://github.com/brianvoe/gofakeit.git
Documentation: pkg.go.dev

# README

gofakeit Go Report Card Build Status codecov.io GoDoc license

Random data generator written in go

75+ Functions!!!

If their is something that is generic enough missing from this package add an issue and let me know what you need. Most of the time ill add it!

Documentation

GoDoc

Example

import "github.com/brianvoe/gofakeit"

gofakeit.Name() // Markus Moen
gofakeit.Email() // [email protected]
gofakeit.Phone() // (570)245-7485
gofakeit.Address().Address // 75776 Lake Viewland, Sterlingstad, New Hampshire 82250-2868
// 70+ more!!!

# Functions

Address will generate a struct of address information.
Bool will generate a random boolean value.
BS will generate a random company bs string.
BuzzWord will generate a random company buzz word string.
ChromeUserAgent will generate a random chrome browser user agent string.
City will generate a random city string.
Color will generate a random color string.
Company will generate a random company name string.
CompanySuffix will generate a random company suffix string.
Contact will generate a struct with information randomly populated contact information.
Country will generate a random country string.
CreditCard will generate a struct full of credit card information.
CreditCardCvv will generate a random CVV number - Its a string because you could have 017 as an exp date.
CreditCardExp will generate a random credit card expiration date string.
CreditCardNumber will generate a random credit card number int.
CreditCardType will generate a random credit card type string.
Date will generate a random time.Time struct.
DateRange will generate a random time.Time struct between a start and end date.
Day will generate a random day between 1 - 31.
DomainName will generate a random url domain name.
DomainSuffix will generate a random domain suffix.
Email will generate a random email string.
Extension will generate a random file extension.
FirefoxUserAgent will generate a random firefox broswer user agent string.
FirstName will generate a random first name.
Gender will generate a random gender string.
Generate fake information from given string.
HexColor will generate a random hexadecimal color string.
Hour will generate a random hour - in military time.
ImageURL will generate a random Image Based Upon Height And Width.
IPv4Address will generate a random version 4 ip address.
IPv6Address will generate a random version 6 ip address.
Job will generate a struct with random job information.
JobDescriptor will generate a random job descriptor string.
JobLevel will generate a random job level string.
JobTitle will generate a random job title string.
LastName will generate a random last name.
Latitude will generate a random latitude float64.
Letter will generate a single random lower case letter.
Lexify will replace ? will random generated letters.
Longitude will generate a random longitude float64.
MimeType will generate a random mime file type.
Minute will generate a random minute.
Month will generate a random month string.
Name will generate a random First and Last Name.
NamePrefix will generate a random name prefix.
NameSuffix will generate a random name suffix.
NanoSecond will generate a random nano second.
Number will generate a random number between given min And max.
Numerify will replace # with random numerical values.
OperaUserAgent will generate a random opera browser user agent string.
Paragraph will generate a random paragraph Set Paragraph Count Set Sentence Count Set Word Count Set Paragraph Separator.
Password will generate a random password.
Person will generate a struct with person information.
Phone will generate a random phone number string.
RandString will take in a slice of string and return a randomly selected value.
RGBColor will generate a random int slice color.
SafariUserAgent will generate a random safari browser user agent string.
SafeColor will generate a random safe color string.
Second will generate a random second.
Seed random.
Sentence will generate a random sentence.
ShuffleInts will randomize a slice of ints.
ShuffleStrings will randomize a slice of strings.
SSN will generate a random Social Security Number.
State will generate a random state string.
StateAbr will generate a random abbreviated state string.
Street will generate a random address street string.
StreetName will generate a random address street name string.
StreetNumber will generate a random address street number string.
StreetPrefix will generate a random address street prefix string.
StreetSuffix will generate a random address street suffix string.
UniqueID will generate a random unique identifier This should be taken lightly as this function just uses password generator.
URL will generate a random url string.
UserAgent will generate a random broswer user agent.
Username will genrate a random username based upon picking a random lastname and random numbers at the end.
Word will generate a random word.
Year will generate a random year between 1900 - current year.
Zip will generate a random Zip code string.

# Variables

Data consists of the main set of fake information.

# Structs

AddressInfo is a struct full of address information.
ContactInfo struct full of contact info.
CreditCardInfo is a struct containing credit variables.
JobInfo is a struct of job information.
PersonInfo is a struct of person information.