GoFaker
Faker is a Go package to generate fake data. It can be used for realistic test data. Inspired by Python Faker
Why use this library?
There are many faker libraries out there already. However, none of them are comprehensive, performant and easy to use. The aim of this library is to combine those things into a quick, easy to use and extensible library, using only core Golang libraries to generate the data.
Installation
go get -u github.com/AaronMulgrew/GoFaker
Usage
Simply import the library and generate a Person struct to accessible available data.
package main
import (
"fmt"
"github.com/AaronMulgrew/GoFaker"
)
func main() {
person := faker.GeneratePerson()
fmt.Println(person.Names.Firstname)
fmt.Println(person)
}
You can also view the Faker Client for a full list of available structs and other examples.
Currently Supported Data
Person
- Banking
- IBAN (Should validate against IBAN validators)
- Account Number
- Bank Code (Does not use real bank codes)
- Automotive
- Names
Server
- Files
- File Location
- Content Type of File (over 1000 content types supported)
- Extensions of Files (over 1000 extensions supported)
Currently Supported Regional Data