{"id":34167179,"url":"https://github.com/skipor/gmg","last_synced_at":"2026-03-09T22:03:18.274Z","repository":{"id":47105839,"uuid":"358497878","full_name":"skipor/gmg","owner":"skipor","description":"Type-safe, fast and handy alternative gomock generator","archived":false,"fork":false,"pushed_at":"2024-05-07T16:48:59.000Z","size":81,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T06:06:19.459Z","etag":null,"topics":["go","go-application","go-testing","go-tools","golang"],"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/skipor.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":"2021-04-16T06:25:37.000Z","updated_at":"2025-01-27T11:56:50.000Z","dependencies_parsed_at":"2024-06-19T22:52:32.563Z","dependency_job_id":"d7ea995a-52f9-4890-935c-a2e01c8adcf0","html_url":"https://github.com/skipor/gmg","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/skipor/gmg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipor%2Fgmg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipor%2Fgmg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipor%2Fgmg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipor%2Fgmg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skipor","download_url":"https://codeload.github.com/skipor/gmg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skipor%2Fgmg/sbom","scorecard":{"id":829704,"data":{"date":"2025-08-11","repo":{"name":"github.com/skipor/gmg","commit":"94ab47430326ca44a917056f0c0271ecfd022749"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T17:25:32.187Z","repository_id":47105839,"created_at":"2025-08-23T17:25:32.188Z","updated_at":"2025-08-23T17:25:32.188Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"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":["go","go-application","go-testing","go-tools","golang"],"created_at":"2025-12-15T10:12:19.212Z","updated_at":"2026-03-09T22:03:18.266Z","avatar_url":"https://github.com/skipor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoMock Generator\n\n`gmg` is type-safe, fast and handy alternative [GoMock](https://github.com/golang/mock) generator.\n\n## Features\n\n* [Up to 4x times faster](#speed-measures) than [`mockgen` in reflect mode](https://github.com/golang/mock#reflect-mode)\n  * `mockgen` builds program depending on your interface and analyse it with `reflect` - that is much extra work!\n  * `gmg` loads ast and type info using [go/packages](https://pkg.go.dev/golang.org/x/tools/go/packages) which doesn't require build and run executable .\n\n* Type-safe\n  * `gomock.Call` wrapped so `Do`, `Return` and `DoAndReturn` arguments are concrete types, but just `args ...interface{}`\n  * Autocomplete works perfect!\n  * After mock regeneration all type inconsistency in tests are visible in IDE as type check errors.\n\n* Robust\n  * Generation usually works, even when compilation is not.\n\n* Easy to use\n  * There are sensible defaults for source package (`.`) and destination (`./mocks`).\n\n    That is, usually, you need only to specify the interface name to mock.\n\n## Install\n\n### **Go version \u003e= 1.16**\n\n`go install github.com/skipor/gmg@latest`\n\n### **Go version \u003c 1.16**\n\n`GO111MODULE=on go get github.com/golang/mock/mockgen@latest`\n\nPlease fix a specific version, if you use `gmg` in automation.\n\n## Usage\n\n```\n$ gmg --help\ngmg is type-safe, fast and handy alternative GoMock generator. See details at: https://github.com/skipor/gmg\n\nUsage: gmg [--src \u003cpackage path\u003e] [--dst \u003cfile path\u003e] [--pkg \u003cpackage name\u003e] \u003cinterface name\u003e [\u003cinterface name\u003e ...]\n\nFlags:\n      --all          Select all interfaces in package.\n                     When called from //go:generate comment then package kind selected automatically: primary - other than *_test.go files; test - *_test.go files; black-box-test - package *_test\n\n      --all-file     Select all interfaces in current file, when called from //go:generate comment .\n\n      --debug        Verbose debug logging.\n  -d, --dst string   Destination directory or file relative path or pattern.\n                     '{}' in directory path will be replaced with the source package name.\n                     '{}' in file name will be replaced with snake case interface name.\n                     If no file name pattern specified, then '{}.go' used by default.\n                     Examples:\n                     \t./mocks\n                     \t./{}mocks\n                     \t./mocks/{}_gomock.go\n                     \t./mocks_test.go # All mocks will be put to single file.\n                      (default \"./mocks\")\n  -p, --pkg string   Package name in generated files.\n                     '{}' will be replaced with source package name.\n                     By default, --dst package name used, or 'mocks_{}' if --dst package is not exist.\n                     Examples:\n                     \tmocks_{} # mockgen style\n                     \t{}mocks # mockery style\n\n  -s, --src string   Source Go package to search for interfaces. Absolute or relative.\n                     Maybe third-party or standard library package.\n                     Examples:\n                     \t.\n                     \t./relative/pkg\n                     \tgithub.com/third-party/pkg\n                     \tio\n                      (default \".\")\n      --version      Show version and exit\n```\n\n## Speed measures\n\n* Large interface - 4x faster\n  `mockgen --destination ./mocks/interface.go k8s.io/client-go/kubernetes`: 3.022 seconds\n  `gmg --src k8s.io/client-go/kubernetes Interface`: 0.741 seconds\n* Small interface - 2x faster\n  `mockgen --destination ./mocks/writer.go io Writer`: 0.676 seconds\n  `gmg --src io Writer`: 0.321 seconds\n\nMeasured on MacBook Pro (15-inch, 2017) 4 core i7, 16G with warm `go build` cache.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskipor%2Fgmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskipor%2Fgmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskipor%2Fgmg/lists"}