Faker is a Go package to generate fake data. It can be used for realistic test data. Inspired by Python Faker
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.
go get -u github.com/AaronMulgrew/GoFaker
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.
- Banking
- IBAN (Should validate against IBAN validators)
- Account Number
- Bank Code (Does not use real bank codes)
- Automotive
- Number Plates
- Names
- Firstname
- Surname
- Files
- File Location
- Content Type of File (over 1000 content types supported)
- Extensions of Files (over 1000 extensions supported)
- English (United Kingdom)