{"id":13521258,"url":"https://github.com/jaswdr/faker","last_synced_at":"2025-12-14T21:31:46.302Z","repository":{"id":38418192,"uuid":"126238614","full_name":"jaswdr/faker","owner":"jaswdr","description":":rocket: Ultimate fake data generator for Go with zero dependencies","archived":false,"fork":false,"pushed_at":"2024-11-01T13:12:09.000Z","size":3618,"stargazers_count":574,"open_issues_count":13,"forks_count":59,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-30T07:51:55.513Z","etag":null,"topics":["contributions-welcome","fake","fake-data","faker","faker-generator","go","golang","hacktoberfest","hacktoberfest-accepted","hacktoberfest2021","hacktoberfest2022","hacktoberfest2023","hacktoberfest2024","open-source"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/jaswdr/faker","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaswdr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jaswdr"}},"created_at":"2018-03-21T20:46:48.000Z","updated_at":"2024-12-23T12:26:43.000Z","dependencies_parsed_at":"2023-09-26T14:34:40.858Z","dependency_job_id":"ccda8820-7f6d-4a7a-b504-11817943bf05","html_url":"https://github.com/jaswdr/faker","commit_stats":null,"previous_names":["jaschweder/faker","jaswd/faker"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaswdr%2Ffaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaswdr%2Ffaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaswdr%2Ffaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaswdr%2Ffaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaswdr","download_url":"https://codeload.github.com/jaswdr/faker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246535809,"owners_count":20793326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contributions-welcome","fake","fake-data","faker","faker-generator","go","golang","hacktoberfest","hacktoberfest-accepted","hacktoberfest2021","hacktoberfest2022","hacktoberfest2023","hacktoberfest2024","open-source"],"created_at":"2024-08-01T06:00:31.797Z","updated_at":"2025-12-14T21:31:46.296Z","avatar_url":"https://github.com/jaswdr.png","language":"Go","funding_links":["https://github.com/sponsors/jaswdr"],"categories":["Go","Members"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"900\" src=\"./cover.png?v=2\"\u003e\n\u003c/p\u003e\n\nFaker is a Go library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.\n\nFaker is heavily inspired by PHP\"s [Faker](https://github.com/fzaninotto/Faker)\n\nFaker requires Go \u003e= 1.22 for 2.X \n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/jaswdr/faker)](https://pkg.go.dev/github.com/jaswdr/faker/v2)\n[![codecov](https://codecov.io/gh/jaswdr/faker/branch/master/graph/badge.svg)](https://codecov.io/gh/jaswdr/faker)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jaswdr/faker)](https://goreportcard.com/report/github.com/jaswdr/faker)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ba14f84a3f824410be0a6f6670de012a)](https://app.codacy.com/gh/jaswdr/faker?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=jaswdr/faker\u0026utm_campaign=Badge_Grade)\n[![CodeFactor](https://www.codefactor.io/repository/github/jaswdr/faker/badge)](https://www.codefactor.io/repository/github/jaswdr/faker)\n[![Release](https://img.shields.io/github/release/jaswdr/faker.svg?style=flat-square)](https://github.com/jaswdr/faker/releases)\n[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/jaswdr/faker)\n\n## Test it directly from your browser\n\nStart at [https://play.golang.org/p/JpTagDGBaHK](https://go.dev/play/p/lMAvp_uyM8r)\n\n## Installation\n\nAdd this to your Go file\n\n```go\nimport \"github.com/jaswdr/faker/v2\"\n```\n\nAnd run `go get` or `dep ensure` to get the package.\n\n## Basic Usage\n\nUse `faker.New()` to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want.\n\n```go\nimport \"github.com/jaswdr/faker/v2\"\n\nfunc main() {\n    fake := faker.New()\n\n    fake.Person().Name()\n    // Lucy Cechtelar\n\n    fake.Address().Address()\n    // 426 Jordy Lodge\n\n    fake.Lorem().Text(100)\n    // Dolores sit sint laboriosam dolorem culpa et autem. Beatae nam sunt fugit\n    // et sit et mollitia sed.\n    // Fuga deserunt tempora facere magni omnis. Omnis quia temporibus laudantium\n    // sit minima sint.\n}\n```\n\nEven if this example shows a method access, each call to `fake.Name()` yields a different (random) result.\n\n```go\np := fake.Person()\n\nfor i:=0; i \u003c 10; i++ {\n  fmt.Println(p.Name())\n}\n  // Adaline Reichel\n  // Dr. Santa Prosacco DVM\n  // Noemy Vandervort V\n  // Lexi O\"Conner\n  // Gracie Weber\n  // Roscoe Johns\n  // Emmett Lebsack\n  // Keegan Thiel\n  // Wellington Koelpin II\n  // Ms. Karley Kiehn V\n```\n\nYou can also generate a profile image.\n\n```go\nimage := p.Image()\n\nfmt.Println(image.Name())\n// /tmp/profil-picture-img-1064677774.jfif\n\nfmt.Printf(\"%+v\", image)\n// \u0026{file:0xc0002e4300}\n```\n\nGenerate fake data using Structs\n\n```go\ntype ExampleStruct struct {\n\tSimpleStringField string\n\tSimpleNumber int\n\tSimpleBool bool\n\tSomeFormatedString string `fake:\"??? ###\"`\n\tSomeStringArray [5]string `fake:\"????\"`\n}\n\nexample := ExampleStruct{}\nf.Struct().Fill(\u0026example)\nfmt.Printf(\"%+v\", example)\n//{SimpleStringField:87576a01c2a547b2bbf9b7c736d1db40 SimpleNumber:9223372036854775807 SimpleBool:false SomeFormatedString:cxo 321 SomeStringArray:[effr swxp ldnj obcs nvlg]}\n```\n\nGenerate random placeholder images using [LoremFlickr](https://loremflickr.com/)\n\n```go\n// get a *os.File pointing to a file that is a random image\nimage := f.LoremFlickr().Image(100, 100, []string{}, \"\", false)\n\nfmt.Println(image.Name())\n// /tmp/loremflickr-img-4101493944.jpg\n```\n\nGenerate profile images using [ThisPersonDoesNotExist](https://thispersondoesnotexist.com/)\n\n```go\nprofileImage := f.ProfileImage().Image()\n\nfmt.Println(profileImage.Name())\n// /tmp/profil-picture-img-4022222298.jfif\n```\n\nSee more formatters in [docs](https://pkg.go.dev/github.com/jaswdr/faker?tab=doc)\n\n## Development\n\nCreate a fork and get the code.\n\n```bash\n$ go get github.com/jaswdr/faker/v2\n```\n\nDo your changes, add tests, run the tests.\n\n```bash\n$ go test\nPASS\nok      github.com/jaswdr/faker/v2 2.966s\n```\n\nPush to your fork and send a new pull request from your fork to this repository.\n\n## Versioning\n\nFaker is maintained under the [Semantic Versioning guidelines](http://semver.org/). Starting at `2.X`, we only support maintained versions of Go. Which according to [Go's Release Policy](https://go.dev/doc/devel/release) means that we only support the two newer major versions.\n\n## License\n\nFaker is released under the MIT Licence. See the bundled LICENSE file for details.\n\n## Maintainer\n\nCreated and maitained by Jonathan Schweder ([@jaswdr](https://github.com/jaswdr)) and [many others](https://github.com/jaswdr/faker/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaswdr%2Ffaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaswdr%2Ffaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaswdr%2Ffaker/lists"}