Description
Fake is a fake data generator for Go (Golang), heavily inspired by the forgery and ffaker Ruby gems.
Fake alternatives and similar packages
Based on the "Testing" category.
Alternatively, view Fake alternatives based on common mentions on social networks and blogs.
-
chromedp
a way to drive/test Chrome, Safari, Edge, Android Webviews, and other browsers supporting the Chrome Debugging Protocol. -
realize
Go build system with file watchers and live reload. Run, build and watch file changes with custom paths -
hoverfly
HTTP(S) proxy for recording and simulating REST/SOAP APIs with extensible middleware and easy-to-use CLI. -
cdp
Type-safe bindings for the Chrome Debugging Protocol that can be used with browsers or other debug targets that implement it. -
ggr
a lightweight server that routes and proxies Selenium Wedriver requests to multiple Selenium hubs. -
gnomock
integration testing with real dependencies (database, cache, even Kubernetes or AWS) running in Docker, without mocks. -
gotest.tools
A collection of packages to augment the go testing package and support common patterns.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of Fake or a related project?
Popular Comparisons
README
Fake
Fake is a fake data generator for Go (Golang), heavily inspired by the forgery and ffaker Ruby gems.
About
Most data and methods are ported from forgery/ffaker Ruby gems. For the list of available methods please look at https://godoc.org/github.com/icrowley/fake. Currently english and russian languages are available.
Fake embeds samples data files unless you call UseExternalData(true)
in order to be able to work without external files dependencies when compiled, so, if you add new data files or make changes to existing ones don't forget to regenerate data.go file using github.com/mjibson/esc
tool and esc -o data.go -pkg fake data
command (or you can just use go generate
command if you are using Go 1.4 or later).
Install
go get github.com/icrowley/fake
Import
import (
"github.com/icrowley/fake"
)
Documentation
Documentation can be found at godoc:
https://godoc.org/github.com/icrowley/fake
Test
To run the project tests:
cd test
go test
Examples
name := fake.FirstName()
fullname := fake.FullName()
product := fake.Product()
Changing language:
err := fake.SetLang("ru")
if err != nil {
panic(err)
}
password := fake.SimplePassword()
Using english fallback:
err := fake.SetLang("ru")
if err != nil {
panic(err)
}
fake.EnFallback(true)
password := fake.Paragraph()
Using external data:
fake.UseExternalData(true)
password := fake.Paragraph()
Author
Dmitry Afanasyev, http://twitter.com/i_crowley [email protected]
Maintainers
Dmitry Moskowski https://github.com/corpix
*Note that all licence references and agreements mentioned in the Fake README section above
are relevant to that project's source code only.