Documentation ¶
Index ¶
- Constants
- Variables
- func Exclude(list []string, exclusion map[string]bool) []string
- func HandleAddress(opts map[string]interface{}) string
- func HandleAdult(opts map[string]interface{}) string
- func HandleEmail(opts map[string]interface{}) string
- func HandleGUID(opts map[string]interface{}) string
- func HandleName(opts map[string]interface{}) string
- func HandleNow(opts map[string]interface{}) string
- func HandlePassword(opts map[string]interface{}) string
- func HandlePhone(opts map[string]interface{}) string
- func HandleSSN(opts map[string]interface{}) (ssn string)
- func HandleSex(opts map[string]interface{}) string
Constants ¶
const SSNRegex = `[134578]\d\d[1-9]\d[1-9]\d\d\d`
SSNRegex is used to implement pseudorandom RE generator that passes perl re while using re2 engine valid perl regex (that is invalid re2 regex): regex = "^(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$"; simple approach: [^2069]xx [^0]x [^0]xxx https://en.wikipedia.org/wiki/Social_Security_number#Valid_SSNs
Variables ¶
var DateFormat = "2006-01-02"
DateFormat is used to format time outputs
var Lower bool
Lower returns the lowercased form of relevant data.
var Not map[string]bool
Not is used to blacklist specific string values
var Short bool
Short returns shortform of relevant data.
Functions ¶
func HandleAddress ¶
HandleAddress handles `gofaker (city|state|zip-code|country)`
func HandleAdult ¶
HandleAdult handles `gofaker adult []` arguments TODO Pass in country codes for legal adult age current assumption is an adult age is 18 years or older
func HandleEmail ¶
HandleEmail handles `gofaker email`
func HandleGUID ¶ added in v0.5.0
HandleGUID handles `gofaker (guid|uuid)`
func HandleName ¶
HandleName handles the boolean map if `gofaker name` is called
func HandlePassword ¶
HandlePassword handles `gofaker password` generation, allows a max and min length default is 8-24
func HandlePhone ¶
HandlePhone handles the boolean map if `gofaker phone` is called
Types ¶
This section is empty.