bxcodec / faker

Go (Golang) Fake Data Generator for Struct. [Notes]This repository is archived, moved to the new repository https://github.com/go-faker/faker
https://pkg.go.dev/github.com/bxcodec/faker/v4
MIT License
2.09k stars 148 forks source link
dummy-data dummy-data-generator fake-data faker generator go golang hactoberfest mock-data struct testing-tools

Important Notes

This repository has been archived, and moved to the new repository here https://github.com/go-faker/faker Further development and fixing will be happening in the new repository.


Docs

faker

Struct Data Fake Generator

Faker will generate you a fake data based on your Struct.

Build Status codecov Go Report Card License Go.Dev

Index

Support

You can file an Issue. See documentation in Go.Dev

Getting Started

Download

go get -u github.com/bxcodec/faker/v4

Example


DEMO


Example to use Faker

Benchmark


Bench To Generate Fake Data

Without Tag

BenchmarkFakerDataNOTTagged-4             500000              3049 ns/op             488 B/op         20 allocs/op

Using Tag

 BenchmarkFakerDataTagged-4                100000             17470 ns/op             380 B/op         26 allocs/op

MUST KNOW


The Struct Field must be PUBLIC.
Support Only For :

Limitation


Unfortunately this library has some limitation

Contribution


To contrib to this project, you can open a PR or an issue.