package
0.0.0-20241105153652-7ddf4d0c408a
Repository: https://github.com/jrnd-io/jrv2.git
Documentation: pkg.go.dev
# Functions
Account returns a random account number of given length.
No description provided by the author
AddValueToList adds value v to Context list l.
Amount returns an amount of money between min and max, and given currency.
No description provided by the author
BirthDate returns a birthdate between minAge and maxAge.
Bitcoin returns a bitcoin address.
BuildingNumber generates a random building number of max n digits.
No description provided by the author
No description provided by the author
Capital returns a random Capital.
CapitalAt returns Capital at given index.
Cardinal return a random cardinal direction, in long or short form.
City returns a random City.
CityAt returns City at given index.
ClearCache is used to internally Cache data from word files.
CodiceFiscale return a valid Italian Codice Fiscale.
Company returns a random Company Name.
Contains checks if the str string is present in an array of string []string.
Counter creates a counter named c, starting from start and incrementing by step.
Country returns the ISO 3166 Country selected with locale.
CountryAt returns an ISO 3166 Country at a given index.
CountryCode returns a random Country Code prefix.
CountryCodeAt returns a Country Code prefix at a given index.
CountryRandom returns a random ISO 3166 Country.
CreditCard returns a valid credit card.
CreditCardCVV returns a random credit card CVV of given length.
Cusip returns a valid 9 characters Cusip code.
CusipCheckDigit calculates cusip check digit.
DateBetween returns a date between fromDate and toDate.
DatesBetween returns an array of num dates between fromDate and toDate.
No description provided by the author
Email returns a random email.
EmailProvider returns a random email provider.
Ethereum returns an ethereum address.
No description provided by the author
FromCSV gets the label value from csv file.
Future returns a date in the future not after the given years.
Gender returns a random gender.
Get Alice text.
No description provided by the author
No description provided by the author
Get Lorem text.
GetV gets value s from Context.
GetValueFromListAtIndex returns a value from Context list l at index.
HTTPMethod returns a random http method.
Image generates a random Image url of given width, height and type.
ImageOf generates a random Image url of given width, height and type.
Imei returns a random imei number of 15 digits.
IndexOf returns the index of the s string in a file.
No description provided by the author
Inject is used to inject a different value with a given probability, typically used to generate a bad value.
No description provided by the author
IPKnownPort returns a random known port number.
IPKnownProtocol returns a random known protocol.
IPv6 returns a random Ipv6 Address.
Isin returns a valid 12 characters Isin code.
IsinCheckDigit calculates an isin check digit.
Latitude returns a random latitude between -90 and 90.
Len returns number of words (lines) in a word file.
Longitude returns a random longitude between -180 and 180.
Lorem generates a 'lorem ipsum' text of size words.
LuhnCheckDigit calculates luhn check digit.
Mac returns a random Mac Address.
No description provided by the author
Maxint returns the minimum between two ints.
Middlename returns a random Middlename.
Minint returns the minimum between two ints.
MobilePhone returns a random mobile phone.
MobilePhoneAt returns a mobile phone at a given index.
Name returns a random Name (male/female).
NameF returns a random female Name.
NameM returns a random male Name.
NearbyGPS returns a random latitude longitude within a given radius in meters.
NewChain returns a new Chain with prefixes of prefixLen words.
Nonsense generates a random Sentence of numWords wordsm using a prefixLen and a baseText to start from.
No description provided by the author
Password returns a random Password of given length, memorable, and with prefix and suffix.
Past returns a date in the past not before the given years.
Phone returns a random land prefix.
PhoneAt returns a land prefix at a given index.
RandomBool returns a random boolean.
RandomIndex returns a random index in a word file.
RandomNValuesFromList returns a random value from Context list l.
No description provided by the author
RandomString returns a random string long between min and max characters.
RandomStringVocabulary returns a random string long between min and max characters using a vocabulary.
RandomValueFromList returns a random value from Context list l.
Recent returns a date in the past not before the given days.
Regex returns a random string matching the given Regex parameter.
Sedol returns a valid 7 characters sedol code.
SedolCheckDigit calculates sedol check digit.
Sentence generates an 'alice in wonderland' text of size words.
SentencePrefix generates an 'alice in wonderland' text of size words with given prefixLen.
SetV adds value v to Context.
Soon returns a date in the future not after the given days.
Ssn return a valid Social Security Number id.
State returns a random State.
StateAt returns State at given index.
StateShort returns a random short State.
StateShortAt returns short State at given index.
StockSymbol returns a NASDAQ stock symbol.
Street returns a random street.
StreetAt returns a street at given index.
Surname returns a random Surname.
Swift returns a swift/bic code.
UniqueId returns a random uuid.
UnixTimeStamp returns a random unix timestamp not older than the given number of days.
User returns a random Username using Name, Surname and a length.
UserAgent returns a random user agent.
Username returns a random Username using Name, Surname.
Valor returns a valid 6-9 digits Valor code.
WeightedRandomInt selects a random integer from the given slice with probability proportional to the corresponding weight.
WeightedRandomString selects a random string from the given slice with probability proportional to the corresponding weight.
Wkn returns a valid 6 characters wkn code.
Word returns a random string from a list of strings in a file.
WordAt returns a string at a given position in a list of strings in a file.
WordShuffle returns a shuffled list of strings in a file.
wordShuffleN return a subset of n elements in a list of string in a file.
WorkEmail returns a random work email.
Xid returns a random uuid (xid is a globally unique id generator thought for the web).
YesOrNo returns a random yes or no.
Zip returns a random Zip code.
ZipAt returns Zip code at given index.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Chain contains a map ("chain") of prefixes to a list of suffixes.
No description provided by the author
# Type aliases
Prefix is a Markov chain prefix of one or more words.