{"id":36489056,"url":"https://github.com/averagebit/mgg","last_synced_at":"2026-01-12T01:54:06.197Z","repository":{"id":115942424,"uuid":"496800571","full_name":"averagebit/mgg","owner":"averagebit","description":"Scans all project files and generates mocks using mockgen mimicking the project structure.","archived":false,"fork":false,"pushed_at":"2022-09-06T14:53:18.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T11:56:58.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/averagebit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-05-26T23:25:05.000Z","updated_at":"2024-01-29T05:47:07.000Z","dependencies_parsed_at":"2023-07-13T07:17:15.834Z","dependency_job_id":null,"html_url":"https://github.com/averagebit/mgg","commit_stats":null,"previous_names":["averagebit/mgutil"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/averagebit/mgg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averagebit%2Fmgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averagebit%2Fmgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averagebit%2Fmgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averagebit%2Fmgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/averagebit","download_url":"https://codeload.github.com/averagebit/mgg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/averagebit%2Fmgg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-12T01:54:06.123Z","updated_at":"2026-01-12T01:54:06.173Z","avatar_url":"https://github.com/averagebit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mgg\n\nScans all files in your project. If the path doesn't contain `_test`,\nthe prefix flag, ends in `.go` and file contains `interface {` it\ngenerates mocks for that interface using\n[mockgen](https://github.com/golang/mock).\n\n## Dependencies\n\n- [mockgen](https://github.com/golang/mock)\n\n## Installation\n\n```\ngo install github.com/averagebit/mgg@latest\n```\n\n## Usage\n\n```\n# USAGE:\n#     mgg [OPTIONS]\n#\n# OPTIONS:\n#     -h, --help      Prints this help message\n#     -d, --dir       Directory to generate mocks in [default: 'mocks']\n#     -p, --prefix    Prefix to use for mock files [default: 'mock_']\n#     -i, --ignore    Paths to ignore when scanning for interfaces [default: ['']]\n```\n\n### Example\n\n```\n# .\n# |--- .git\n# |--- README.md\n# |--- go.mod\n# |--- main.go # has interface\n# |--- mocks\n#     |--- mock_pkg\n#         |--- mock_logger.go\n#         |--- mock_pubsub.go\n# |--- pkg\n#     |--- logger.go # has interface\n#     |--- pubsub.go # has interface\n\n$ mgg --dir=mocks --prefix=mock_ --ignore=main.go,pkg/logger.go\nGenerated 'mocks/mock_pkg/mock_pubsub.go'\n```\n\n## TODO:\n\n- Respect `.gitignore`.\n- Support passing flags to `mockgen`.\n- Create unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragebit%2Fmgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faveragebit%2Fmgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragebit%2Fmgg/lists"}