Documentation ¶
Overview ¶
Package gofakeit is a random data generator written in go
Every function has an example and a benchmark ¶
See the full list here https://godoc.org/github.com/brianvoe/gofakeit
80+ Functions!!!
Example ¶
Seed(11) fmt.Println("Name:", Name()) fmt.Println("Email:", Email()) fmt.Println("Phone:", Phone()) fmt.Println("Address:", Address().Address) fmt.Println("BS:", BS()) fmt.Println("Beer Name:", BeerName()) fmt.Println("Color:", Color()) fmt.Println("Company:", Company()) fmt.Println("Credit Card:", CreditCardNumber()) fmt.Println("Hacker Phrase:", HackerPhrase()) fmt.Println("Job Title:", JobTitle()) fmt.Println("Password:", Password(true, true, true, true, true, 32)) currency := Currency() fmt.Printf("Currency: %s - %s", currency.Short, currency.Long)
Output: Name: Markus Moen Email: alaynawuckert@kozey.biz Phone: (570)245-7485 Address: 75776 Lake Viewland, Sterlingstad, New Hampshire 82250-2868 BS: bleeding-edge Beer Name: Founders Kentucky Breakfast Color: Orchid Company: Hintz, Crooks and McKenzie Credit Card: 4071613324482755 Hacker Phrase: If we calculate the capacitor, we can get to the THX port through the back-end SSL matrix! Job Title: Manager Password: E1&U_#fm&89QExx$X%83qC-$9Z2qPA2t Currency: INR - India Rupee
Index ¶
- func BS() string
- func BeerAlcohol() string
- func BeerBlg() string
- func BeerHop() string
- func BeerIbu() string
- func BeerMalt() string
- func BeerName() string
- func BeerStyle() string
- func BeerYeast() string
- func Bool() bool
- func BuzzWord() string
- func ChromeUserAgent() string
- func City() (city string)
- func Color() string
- func Company() (company string)
- func CompanySuffix() string
- func Country() string
- func CreditCardCvv() string
- func CreditCardExp() string
- func CreditCardNumber() int
- func CreditCardType() string
- func CurrencyLong() string
- func CurrencyShort() string
- func Date() time.Time
- func DateRange(start, end time.Time) time.Time
- func Day() int
- func DomainName() string
- func DomainSuffix() string
- func Email() string
- func Extension() string
- func FirefoxUserAgent() string
- func FirstName() string
- func Gender() string
- func Generate(dataVal string) string
- func HTTPMethod() string
- func HackerAbbreviation() string
- func HackerAdjective() string
- func HackerIngverb() string
- func HackerNoun() string
- func HackerPhrase() string
- func HackerVerb() string
- func HexColor() string
- func HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
- func HipsterSentence(wordCount int) string
- func HipsterWord() string
- func Hour() int
- func IPv4Address() string
- func IPv6Address() string
- func ImageURL(width int, height int) string
- func JobDescriptor() string
- func JobLevel() string
- func JobTitle() string
- func LastName() string
- func Latitude() float64
- func Letter() string
- func Lexify(str string) string
- func Longitude() float64
- func MimeType() string
- func Minute() int
- func Month() string
- func Name() string
- func NamePrefix() string
- func NameSuffix() string
- func NanoSecond() int
- func Number(min int, max int) int
- func Numerify(str string) string
- func OperaUserAgent() string
- func Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
- func Password(lower bool, upper bool, numeric bool, special bool, space bool, length int) string
- func Phone() string
- func RGBColor() []int
- func RandString(a []string) string
- func SSN() string
- func SafariUserAgent() string
- func SafeColor() string
- func Second() int
- func Seed(seed int64)
- func Sentence(wordCount int) string
- func ShuffleInts(a []int)
- func ShuffleStrings(a []string)
- func SimpleStatusCode() int
- func State() string
- func StateAbr() string
- func StatusCode() int
- func Street() (street string)
- func StreetName() string
- func StreetNumber() string
- func StreetPrefix() string
- func StreetSuffix() string
- func URL() string
- func UUID() string
- func UserAgent() string
- func Username() string
- func Word() string
- func Year() int
- func Zip() string
- type AddressInfo
- type ContactInfo
- type CreditCardInfo
- type CurrencyInfo
- type JobInfo
- type PersonInfo
Examples ¶
- Package
- Address
- BS
- BeerAlcohol
- BeerBlg
- BeerHop
- BeerIbu
- BeerMalt
- BeerName
- BeerStyle
- BeerYeast
- Bool
- BuzzWord
- ChromeUserAgent
- City
- Color
- Company
- CompanySuffix
- Contact
- Country
- CreditCard
- CreditCardCvv
- CreditCardExp
- CreditCardNumber
- CreditCardType
- Currency
- CurrencyLong
- CurrencyShort
- Date
- DateRange
- Day
- DomainName
- DomainSuffix
- Extension
- FirefoxUserAgent
- FirstName
- Gender
- Generate
- HTTPMethod
- HackerAbbreviation
- HackerAdjective
- HackerIngverb
- HackerNoun
- HackerPhrase
- HackerVerb
- HexColor
- HipsterParagraph
- HipsterSentence
- HipsterWord
- Hour
- IPv4Address
- IPv6Address
- ImageURL
- Job
- JobDescriptor
- JobLevel
- JobTitle
- LastName
- Latitude
- Letter
- Lexify
- Longitude
- MimeType
- Minute
- Month
- Name
- NamePrefix
- NameSuffix
- NanoSecond
- Number
- Numerify
- OperaUserAgent
- Paragraph
- Password
- Person
- Phone
- RGBColor
- SSN
- SafariUserAgent
- SafeColor
- Second
- Sentence
- ShuffleInts
- ShuffleStrings
- SimpleStatusCode
- State
- StateAbr
- StatusCode
- Street
- StreetName
- StreetNumber
- StreetPrefix
- StreetSuffix
- URL
- UUID
- UserAgent
- Username
- Word
- Year
- Zip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BS ¶
func BS() string
BS will generate a random company bs string
Example ¶
Seed(11) fmt.Println(BS())
Output: front-end
func BeerAlcohol ¶
func BeerAlcohol() string
BeerAlcohol will return a random beer alcohol level between 2.0 and 10.0
Example ¶
Seed(11) fmt.Println(BeerAlcohol())
Output: 2.7%
func BeerBlg ¶
func BeerBlg() string
BeerBlg will return a random beer blg between 5.0 and 20.0
Example ¶
Seed(11) fmt.Println(BeerBlg())
Output: 6.4°Blg
func BeerHop ¶
func BeerHop() string
BeerHop will return a random beer hop
Example ¶
Seed(11) fmt.Println(BeerHop())
Output: Glacier
func BeerIbu ¶
func BeerIbu() string
BeerIbu will return a random beer ibu value between 10 and 100
Example ¶
Seed(11) fmt.Println(BeerIbu())
Output: 29 IBU
func BeerMalt ¶
func BeerMalt() string
BeerMalt will return a random beer malt
Example ¶
Seed(11) fmt.Println(BeerMalt())
Output: Munich
func BeerName ¶
func BeerName() string
BeerName will return a random beer name
Example ¶
Seed(11) fmt.Println(BeerName())
Output: Duvel
func BeerStyle ¶
func BeerStyle() string
BeerStyle will return a random beer style
Example ¶
Seed(11) fmt.Println(BeerStyle())
Output: European Amber Lager
func BeerYeast ¶
func BeerYeast() string
BeerYeast will return a random beer yeast
Example ¶
Seed(11) fmt.Println(BeerYeast())
Output: 1388 - Belgian Strong Ale
func Bool ¶
func Bool() bool
Bool will generate a random boolean value
Example ¶
Seed(11) fmt.Println(Bool())
Output: false
func BuzzWord ¶
func BuzzWord() string
BuzzWord will generate a random company buzz word string
Example ¶
Seed(11) fmt.Println(BuzzWord())
Output: disintermediate
func ChromeUserAgent ¶
func ChromeUserAgent() string
ChromeUserAgent will generate a random chrome browser user agent string
Example ¶
Seed(11) fmt.Println(ChromeUserAgent())
Output: Mozilla/5.0 (X11; Linux i686) AppleWebKit/5312 (KHTML, like Gecko) Chrome/39.0.836.0 Mobile Safari/5312
func City ¶
func City() (city string)
City will generate a random city string
Example ¶
Seed(11) fmt.Println(City())
Output: Marcelside
func Color ¶
func Color() string
Color will generate a random color string
Example ¶
Seed(11) fmt.Println(Color())
Output: MediumOrchid
func Company ¶
func Company() (company string)
Company will generate a random company name string
Example ¶
Seed(11) fmt.Println(Company())
Output: Moen, Pagac and Wuckert
func CompanySuffix ¶
func CompanySuffix() string
CompanySuffix will generate a random company suffix string
Example ¶
Seed(11) fmt.Println(CompanySuffix())
Output: Inc
func Country ¶
func Country() string
Country will generate a random country string
Example ¶
Seed(11) fmt.Println(Country())
Output: Tajikistan
func CreditCardCvv ¶
func CreditCardCvv() string
CreditCardCvv will generate a random CVV number - Its a string because you could have 017 as an exp date
Example ¶
Seed(11) fmt.Println(CreditCardCvv())
Output: 328
func CreditCardExp ¶
func CreditCardExp() string
CreditCardExp will generate a random credit card expiration date string
Example ¶
Seed(11) fmt.Println(CreditCardExp())
Output: 01/20
func CreditCardNumber ¶
func CreditCardNumber() int
CreditCardNumber will generate a random credit card number int
Example ¶
Seed(11) fmt.Println(CreditCardNumber())
Output: 4287271570245748
func CreditCardType ¶
func CreditCardType() string
CreditCardType will generate a random credit card type string
Example ¶
Seed(11) fmt.Println(CreditCardType())
Output: Visa
func CurrencyLong ¶
func CurrencyLong() string
CurrencyLong will generate a random long currency name
Example ¶
Seed(11) fmt.Println(CurrencyLong())
Output: Iraq Dinar
func CurrencyShort ¶
func CurrencyShort() string
CurrencyShort will generate a random short currency value
Example ¶
Seed(11) fmt.Println(CurrencyShort())
Output: IQD
func Date ¶
Date will generate a random time.Time struct
Example ¶
Seed(11) fmt.Println(Date())
Output: 1978-01-07 04:14:25.685339029 +0000 UTC
func DateRange ¶
DateRange will generate a random time.Time struct between a start and end date
Example ¶
Seed(11) fmt.Println(DateRange(time.Unix(0, 484633944473634951), time.Unix(0, 1431318744473668209))) // May 10, 1985 years to May 10, 2015
Output: 2012-02-04 14:10:37.166933216 +0000 UTC
func Day ¶
func Day() int
Day will generate a random day between 1 - 31
Example ¶
Seed(11) fmt.Println(Day())
Output: 12
func DomainName ¶
func DomainName() string
DomainName will generate a random url domain name
Example ¶
Seed(11) fmt.Println(DomainName())
Output: centraltarget.org
func DomainSuffix ¶
func DomainSuffix() string
DomainSuffix will generate a random domain suffix
Example ¶
Seed(11) fmt.Println(DomainSuffix())
Output: com
func Email ¶
func Email() string
Email will generate a random email string
Example ¶
Seed(11) fmt.Println(Email())
Output: markusmoen@pagac.net
func Extension ¶
func Extension() string
Extension will generate a random file extension
Example ¶
Seed(11) fmt.Println(Extension())
Output: nes
func FirefoxUserAgent ¶
func FirefoxUserAgent() string
FirefoxUserAgent will generate a random firefox broswer user agent string
Example ¶
Seed(11) fmt.Println(FirefoxUserAgent())
Output: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_8_3 rv:7.0) Gecko/1978-07-01 Firefox/37.0
func FirstName ¶
func FirstName() string
FirstName will generate a random first name
Example ¶
Seed(11) fmt.Println(FirstName())
Output: Markus
func Gender ¶
func Gender() string
Gender will generate a random gender string
Example ¶
Seed(11) fmt.Println(Gender())
Output: female
func Generate ¶
Generate fake information from given string. String should contain {category.subcategory}
Ex: {name.first} - random firstname
Ex: {name.first}###{name.last}@{name.last}.{internet.domain_suffix} - billy834smith@smith.com
Ex: ### - 481 - random numbers
Ex: ??? - fda - random letters
Example ¶
Seed(11) fmt.Println(Generate("{person.first} {person.last} lives at {address.number} {address.street_name} {address.street_suffix}"))
Output: Markus Moen lives at 715 Garden mouth
func HTTPMethod ¶
func HTTPMethod() string
HTTPMethod will generate a random http method
Example ¶
Seed(11) fmt.Println(HTTPMethod())
Output: HEAD
func HackerAbbreviation ¶
func HackerAbbreviation() string
HackerAbbreviation will return a random hacker abbreviation
Example ¶
Seed(20) fmt.Println(HackerAbbreviation())
Output: AGP
func HackerAdjective ¶
func HackerAdjective() string
HackerAdjective will return a random hacker adjective
Example ¶
Seed(20) fmt.Println(HackerAdjective())
Output: online
func HackerIngverb ¶
func HackerIngverb() string
HackerIngverb will return a random hacker ingverb
Example ¶
Seed(20) fmt.Println(HackerIngverb())
Output: navigating
func HackerNoun ¶
func HackerNoun() string
HackerNoun will return a random hacker noun
Example ¶
Seed(20) fmt.Println(HackerNoun())
Output: pixel
func HackerPhrase ¶
func HackerPhrase() string
HackerPhrase will return a random hacker sentence
Example ¶
Seed(20) fmt.Println(HackerPhrase())
Output: Connecting the array won't do anything, we need to generate the haptic COM driver!
func HackerVerb ¶
func HackerVerb() string
HackerVerb will return a random hacker verb
Example ¶
Seed(20) fmt.Println(HackerVerb())
Output: connect
func HexColor ¶
func HexColor() string
HexColor will generate a random hexadecimal color string
Example ¶
Seed(11) fmt.Println(HexColor())
Output: #i15jb7
func HipsterParagraph ¶
func HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
HipsterParagraph will generate a random paragraph Set Paragraph Count Set Sentence Count Set Word Count Set Paragraph Separator
Example ¶
Seed(11) fmt.Println(HipsterParagraph(3, 5, 12, "\n"))
Output: Microdosing roof chia echo pickled meditation cold-pressed raw denim fingerstache normcore sriracha pork belly. Wolf try-hard pop-up blog tilde hashtag health butcher waistcoat paleo portland vinegar. Microdosing sartorial blue bottle slow-carb freegan five dollar toast you probably haven't heard of them asymmetrical chia farm-to-table narwhal banjo. Gluten-free blog authentic literally synth vinyl meh ethical health fixie banh mi Yuccie. Try-hard drinking squid seitan cray VHS echo chillwave hammock kombucha food truck sustainable. Pug bushwick hella tote bag cliche direct trade waistcoat yr waistcoat knausgaard pour-over master. Pitchfork jean shorts franzen flexitarian distillery hella meggings austin knausgaard crucifix wolf heirloom. Crucifix food truck you probably haven't heard of them trust fund fixie gentrify pitchfork stumptown mlkshk umami chambray blue bottle. 3 wolf moon swag +1 biodiesel knausgaard semiotics taxidermy meh artisan hoodie +1 blue bottle. Fashion axe forage mixtape Thundercats pork belly whatever 90's beard selfies chambray cred mlkshk. Shabby chic typewriter VHS readymade lo-fi bitters PBR&B gentrify lomo raw denim freegan put a bird on it. Raw denim cliche dreamcatcher pug fixie park trust fund migas fingerstache sriracha +1 mustache. Tilde shoreditch kickstarter franzen dreamcatcher green juice mustache neutra polaroid stumptown organic schlitz. Flexitarian ramps chicharrones kogi lo-fi mustache tilde forage street church-key williamsburg taxidermy. Chia mustache plaid mumblecore squid slow-carb disrupt Thundercats goth shoreditch master direct trade.
func HipsterSentence ¶
HipsterSentence will generate a random sentence
Example ¶
Seed(11) fmt.Println(HipsterSentence(5))
Output: Microdosing roof chia echo pickled.
func HipsterWord ¶
func HipsterWord() string
HipsterWord will return a single hipster word
Example ¶
Seed(11) fmt.Println(HipsterWord())
Output: microdosing
func Hour ¶
func Hour() int
Hour will generate a random hour - in military time
Example ¶
Seed(11) fmt.Println(Hour())
Output: 0
func IPv4Address ¶
func IPv4Address() string
IPv4Address will generate a random version 4 ip address
Example ¶
Seed(11) fmt.Println(IPv4Address())
Output: 222.83.191.222
func IPv6Address ¶
func IPv6Address() string
IPv6Address will generate a random version 6 ip address
Example ¶
Seed(11) fmt.Println(IPv6Address())
Output: 2001:cafe:8898:ee17:bc35:9064:5866:d019
func ImageURL ¶
ImageURL will generate a random Image Based Upon Height And Width. Images Provided by LoremPixel (http://lorempixel.com/)
Example ¶
Seed(11) fmt.Println(ImageURL(640, 480))
Output: http://lorempixel.com/640/480
func JobDescriptor ¶
func JobDescriptor() string
JobDescriptor will generate a random job descriptor string
Example ¶
Seed(11) fmt.Println(JobDescriptor())
Output: Central
func JobLevel ¶
func JobLevel() string
JobLevel will generate a random job level string
Example ¶
Seed(11) fmt.Println(JobLevel())
Output: Assurance
func JobTitle ¶
func JobTitle() string
JobTitle will generate a random job title string
Example ¶
Seed(11) fmt.Println(JobTitle())
Output: Director
func LastName ¶
func LastName() string
LastName will generate a random last name
Example ¶
Seed(11) fmt.Println(LastName())
Output: Daniel
func Latitude ¶
func Latitude() float64
Latitude will generate a random latitude float64
Example ¶
Seed(11) fmt.Println(Latitude())
Output: -73.53405629980608
func Letter ¶
func Letter() string
Letter will generate a single random lower case letter
Example ¶
Seed(11) fmt.Println(Letter())
Output: g
func Lexify ¶
Lexify will replace ? will random generated letters
Example ¶
Seed(11) fmt.Println(Lexify("?????"))
Output: gbrma
func Longitude ¶
func Longitude() float64
Longitude will generate a random longitude float64
Example ¶
Seed(11) fmt.Println(Longitude())
Output: -147.06811259961216
func MimeType ¶
func MimeType() string
MimeType will generate a random mime file type
Example ¶
Seed(11) fmt.Println(MimeType())
Output: application/dsptype
func Minute ¶
func Minute() int
Minute will generate a random minute
Example ¶
Seed(11) fmt.Println(Minute())
Output: 0
func Month ¶
func Month() string
Month will generate a random month string
Example ¶
Seed(11) fmt.Println(Month())
Output: January
func Name ¶
func Name() string
Name will generate a random First and Last Name
Example ¶
Seed(11) fmt.Println(Name())
Output: Markus Moen
func NamePrefix ¶
func NamePrefix() string
NamePrefix will generate a random name prefix
Example ¶
Seed(11) fmt.Println(NamePrefix())
Output: Mr.
func NameSuffix ¶
func NameSuffix() string
NameSuffix will generate a random name suffix
Example ¶
Seed(11) fmt.Println(NameSuffix())
Output: Jr.
func NanoSecond ¶
func NanoSecond() int
NanoSecond will generate a random nano second
Example ¶
Seed(11) fmt.Println(NanoSecond())
Output: 196446360
func Number ¶
Number will generate a random number between given min And max
Example ¶
Seed(11) fmt.Println(Number(50, 23456))
Output: 14866
func Numerify ¶
Numerify will replace # with random numerical values
Example ¶
Seed(11) fmt.Println(Numerify("###-###-####"))
Output: 328-727-1570
func OperaUserAgent ¶
func OperaUserAgent() string
OperaUserAgent will generate a random opera browser user agent string
Example ¶
Seed(11) fmt.Println(OperaUserAgent())
Output: Opera/8.39 (Macintosh; U; PPC Mac OS X 10_8_7; en-US) Presto/2.9.335 Version/10.00
func Paragraph ¶
Paragraph will generate a random paragraph Set Paragraph Count Set Sentence Count Set Word Count Set Paragraph Separator
Example ¶
Seed(11) fmt.Println(Paragraph(3, 5, 12, "\n"))
Output: Quia quae repellat consequatur quidem nisi quo qui voluptatum accusantium quisquam amet. Quas et ut non dolorem ipsam aut enim assumenda mollitia harum ut. Dicta similique veniam nulla voluptas at excepturi non ad maxime at non. Eaque hic repellat praesentium voluptatem qui consequuntur dolor iusto autem velit aut. Fugit tempore exercitationem harum consequatur voluptatum modi minima aut eaque et et. Aut ea voluptatem dignissimos expedita odit tempore quod aut beatae ipsam iste. Minus voluptatibus dolorem maiores eius sed nihil vel enim odio voluptatem accusamus. Natus quibusdam temporibus tenetur cumque sint necessitatibus dolorem ex ducimus iusto ex. Voluptatem neque dicta explicabo officiis et ducimus sit ut ut praesentium pariatur. Illum molestias nisi at dolore ut voluptatem accusantium et fugiat et ut. Explicabo incidunt reprehenderit non quia dignissimos recusandae vitae soluta quia et quia. Aut veniam voluptas consequatur placeat sapiente non eveniet voluptatibus magni velit eum. Nobis vel repellendus sed est qui autem laudantium quidem quam ullam consequatur. Aut iusto ut commodi similique quae voluptatem atque qui fugiat eum aut. Quis distinctio consequatur voluptatem vel aliquid aut laborum facere officiis iure tempora.
func Password ¶
Password will generate a random password
Example ¶
Seed(11) fmt.Println(Password(true, true, true, true, true, 32))
Output: WV10MzLxq2DX79w1omH97_0ga59j8 kj
func Phone ¶
func Phone() string
Phone will generate a random phone number string
Example ¶
Seed(11) fmt.Println(Phone())
Output: 287-271-5702
func RGBColor ¶
func RGBColor() []int
RGBColor will generate a random int slice color
Example ¶
Seed(11) fmt.Println(RGBColor())
Output: [152 23 53]
func RandString ¶ added in v1.2.0
RandString will take in a slice of string and return a randomly selected value
func SSN ¶
func SSN() string
SSN will generate a random Social Security Number
Example ¶
Seed(11) fmt.Println(SSN())
Output: 328-727-1570
func SafariUserAgent ¶
func SafariUserAgent() string
SafariUserAgent will generate a random safari browser user agent string
Example ¶
Seed(11) fmt.Println(SafariUserAgent())
Output: Mozilla/5.0 (iPad; CPU OS 8_3_2 like Mac OS X; en-US) AppleWebKit/531.15.6 (KHTML, like Gecko) Version/4.0.5 Mobile/8B120 Safari/6531.15.6
func SafeColor ¶
func SafeColor() string
SafeColor will generate a random safe color string
Example ¶
Seed(11) fmt.Println(SafeColor())
Output: black
func Second ¶
func Second() int
Second will generate a random second
Example ¶
Seed(11) fmt.Println(Second())
Output: 0
func Sentence ¶
Sentence will generate a random sentence
Example ¶
Seed(11) fmt.Println(Sentence(5))
Output: Quia quae repellat consequatur quidem.
func ShuffleInts ¶
func ShuffleInts(a []int)
ShuffleInts will randomize a slice of ints
Example ¶
Seed(11) ints := []int{52, 854, 941, 74125, 8413, 777, 89416, 841657} ShuffleInts(ints) fmt.Println(ints)
Output: [74125 777 941 89416 8413 854 52 841657]
func ShuffleStrings ¶
func ShuffleStrings(a []string)
ShuffleStrings will randomize a slice of strings
Example ¶
Seed(11) strings := []string{"happy", "times", "for", "everyone", "have", "a", "good", "day"} ShuffleStrings(strings) fmt.Println(strings)
Output: [everyone a for good have times happy day]
func SimpleStatusCode ¶
func SimpleStatusCode() int
SimpleStatusCode will generate a random simple status code
Example ¶
Seed(11) fmt.Println(SimpleStatusCode())
Output: 200
func State ¶
func State() string
State will generate a random state string
Example ¶
Seed(11) fmt.Println(State())
Output: Hawaii
func StateAbr ¶
func StateAbr() string
StateAbr will generate a random abbreviated state string
Example ¶
Seed(11) fmt.Println(StateAbr())
Output: OR
func StatusCode ¶
func StatusCode() int
StatusCode will generate a random status code
Example ¶
Seed(11) fmt.Println(StatusCode())
Output: 404
func Street ¶
func Street() (street string)
Street will generate a random address street string
Example ¶
Seed(11) fmt.Println(Street())
Output: 872 East Rapidsborough
func StreetName ¶
func StreetName() string
StreetName will generate a random address street name string
Example ¶
Seed(11) fmt.Println(StreetName())
Output: View
func StreetNumber ¶
func StreetNumber() string
StreetNumber will generate a random address street number string
Example ¶
Seed(11) fmt.Println(StreetNumber())
Output: 28727
func StreetPrefix ¶
func StreetPrefix() string
StreetPrefix will generate a random address street prefix string
Example ¶
Seed(11) fmt.Println(StreetPrefix())
Output: Lake
func StreetSuffix ¶
func StreetSuffix() string
StreetSuffix will generate a random address street suffix string
Example ¶
Seed(11) fmt.Println(StreetSuffix())
Output: land
func URL ¶
func URL() string
URL will generate a random url string
Example ¶
Seed(11) fmt.Println(URL())
Output: https://www.nationalseamless.net/iterate/streamline/systems
func UUID ¶
func UUID() string
UUID (version 4) will generate a random unique identifier based upon random nunbers Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Example ¶
Seed(11) fmt.Println(UUID())
Output: 590c1440-9888-45b0-bd51-a817ee07c3f2
func UserAgent ¶
func UserAgent() string
UserAgent will generate a random broswer user agent
Example ¶
Seed(11) fmt.Println(UserAgent())
Output: Mozilla/5.0 (Windows NT 5.0) AppleWebKit/5362 (KHTML, like Gecko) Chrome/37.0.834.0 Mobile Safari/5362
func Username ¶
func Username() string
Username will genrate a random username based upon picking a random lastname and random numbers at the end
Example ¶
Seed(11) fmt.Println(Username())
Output: Daniel2872
func Word ¶
func Word() string
Word will generate a random word
Example ¶
Seed(11) fmt.Println(Word())
Output: quia
Types ¶
type AddressInfo ¶
type AddressInfo struct { Address string Street string City string State string Zip string Country string Latitude float64 Longitude float64 }
AddressInfo is a struct full of address information
func Address ¶
func Address() *AddressInfo
Address will generate a struct of address information
Example ¶
Seed(11) address := Address() fmt.Println(address.Address) fmt.Println(address.Street) fmt.Println(address.City) fmt.Println(address.State) fmt.Println(address.Zip) fmt.Println(address.Country) fmt.Println(address.Latitude) fmt.Println(address.Longitude)
Output: 872 East Rapidsborough, Rutherfordstad, New Jersey 74853-6757 872 East Rapidsborough Rutherfordstad New Jersey 74853-6757 Tajikistan -37.581128692020386 -68.9641386085956
type ContactInfo ¶
ContactInfo struct full of contact info
func Contact ¶
func Contact() *ContactInfo
Contact will generate a struct with information randomly populated contact information
Example ¶
Seed(11) contact := Contact() fmt.Println(contact.Phone) fmt.Println(contact.Email)
Output: 287-271-5702 carolecarroll@bosco.net
type CreditCardInfo ¶
CreditCardInfo is a struct containing credit variables
func CreditCard ¶
func CreditCard() *CreditCardInfo
CreditCard will generate a struct full of credit card information
Example ¶
Seed(11) ccInfo := CreditCard() fmt.Println(ccInfo.Type) fmt.Println(ccInfo.Number) fmt.Println(ccInfo.Exp) fmt.Println(ccInfo.Cvv)
Output: Visa 6587271570245748 03/15 675
type CurrencyInfo ¶
CurrencyInfo is a struct of currency information
func Currency ¶
func Currency() *CurrencyInfo
Currency will generate a struct with random currency information
Example ¶
Seed(11) currency := Currency() fmt.Printf("%s - %s", currency.Short, currency.Long)
Output: IQD - Iraq Dinar
type PersonInfo ¶
type PersonInfo struct { FirstName string LastName string Gender string SSN string Image string Job *JobInfo Address *AddressInfo Contact *ContactInfo CreditCard *CreditCardInfo }
PersonInfo is a struct of person information
func Person ¶
func Person() *PersonInfo
Person will generate a struct with person information
Example ¶
Seed(11) person := Person() job := person.Job address := person.Address contact := person.Contact creditCard := person.CreditCard fmt.Println(person.FirstName) fmt.Println(person.LastName) fmt.Println(person.Gender) fmt.Println(person.SSN) fmt.Println(person.Image) fmt.Println(job.Company) fmt.Println(job.Title) fmt.Println(job.Descriptor) fmt.Println(job.Level) fmt.Println(address.Address) fmt.Println(address.Street) fmt.Println(address.City) fmt.Println(address.State) fmt.Println(address.Zip) fmt.Println(address.Country) fmt.Println(address.Latitude) fmt.Println(address.Longitude) fmt.Println(contact.Phone) fmt.Println(contact.Email) fmt.Println(creditCard.Type) fmt.Println(creditCard.Number) fmt.Println(creditCard.Exp) fmt.Println(creditCard.Cvv)
Output: Markus Moen male 727-157-0245 http://lorempixel.com/300/300/people Jacobi-Kuhic Director Forward Accounts 776 Roadshaven, Hilllville, Montana 58225 776 Roadshaven Hilllville Montana 58225 Rwanda -24.329611640922778 -133.75991475181377 748.033.6154 berniecebernier@halvorson.biz Discover 343324482755424 04/15 278