{"id":15935980,"url":"https://github.com/qawatake/faketest","last_synced_at":"2025-04-03T19:29:10.047Z","repository":{"id":250719630,"uuid":"835232115","full_name":"qawatake/faketest","owner":"qawatake","description":"Fakes should be random.","archived":false,"fork":false,"pushed_at":"2024-07-29T13:52:14.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T07:41:17.498Z","etag":null,"topics":["go","golang","testing"],"latest_commit_sha":null,"homepage":"","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/qawatake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T12:26:53.000Z","updated_at":"2024-07-30T00:14:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"e59100a2-9edf-4e5c-9e50-a1248ab1dddd","html_url":"https://github.com/qawatake/faketest","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"dc404ed640dfa5298a7997c1c73b3c6d842c530c"},"previous_names":["qawatake/faketest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffaketest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffaketest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffaketest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffaketest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qawatake","download_url":"https://codeload.github.com/qawatake/faketest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247064749,"owners_count":20877644,"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":["go","golang","testing"],"created_at":"2024-10-07T04:03:09.313Z","updated_at":"2025-04-03T19:29:10.016Z","avatar_url":"https://github.com/qawatake.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# faketest\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/qawatake/faketest.svg)](https://pkg.go.dev/github.com/qawatake/faketest)\n[![test](https://github.com/qawatake/faketest/actions/workflows/test.yaml/badge.svg)](https://github.com/qawatake/faketest/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/qawatake/faketest/graph/badge.svg)](https://codecov.io/gh/qawatake/faketest)\n\nFakes should be random.\n\n```go\nfunc TestGood(t *testing.T) {\n\tt.Parallel()\n\tfaketest.AssertEachFieldIsRandom(t, Good) // OK\n}\n\nfunc TestBad(t *testing.T) {\n\tt.Parallel()\n\tfaketest.AssertEachFieldIsRandom(t, Bad) // \"Book.Name is not random\"\n}\n\ntype Book struct {\n\tID   int64\n\tName string\n}\n\nfunc Good() *Book {\n\treturn \u0026Book{\n\t\tID:   rand.Int64(),\n\t\tName: []string{\"Macbeth\", \"Hamlet\", \"Othello\"}[rand.IntN(3)],\n\t}\n}\n\nfunc Bad() *Book {\n\treturn \u0026Book{\n\t\tID:   rand.Int64(),\n\t\tName: \"Fixed\",\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqawatake%2Ffaketest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqawatake%2Ffaketest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqawatake%2Ffaketest/lists"}