{"id":13764134,"url":"https://github.com/hexdigest/gounit","last_synced_at":"2026-01-17T19:21:14.170Z","repository":{"id":57495330,"uuid":"120235324","full_name":"hexdigest/gounit","owner":"hexdigest","description":"Unit tests generator for Go programming language","archived":false,"fork":false,"pushed_at":"2018-08-17T09:38:42.000Z","size":185,"stargazers_count":84,"open_issues_count":1,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-10T17:41:39.365Z","etag":null,"topics":["generator","go","golang","unit-testing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexdigest.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}},"created_at":"2018-02-05T00:08:30.000Z","updated_at":"2025-03-11T03:38:15.000Z","dependencies_parsed_at":"2022-08-31T12:03:36.591Z","dependency_job_id":null,"html_url":"https://github.com/hexdigest/gounit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hexdigest/gounit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexdigest%2Fgounit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexdigest%2Fgounit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexdigest%2Fgounit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexdigest%2Fgounit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexdigest","download_url":"https://codeload.github.com/hexdigest/gounit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexdigest%2Fgounit/sbom","scorecard":{"id":462829,"data":{"date":"2025-08-11","repo":{"name":"github.com/hexdigest/gounit","commit":"f1874d3307cb8718e5614646fbf8faffd992f371"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"Code-Review","score":0,"reason":"Found 1/29 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":"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":"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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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"}}]},"last_synced_at":"2025-08-19T11:36:44.405Z","repository_id":57495330,"created_at":"2025-08-19T11:36:44.405Z","updated_at":"2025-08-19T11:36:44.405Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28516790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"last_error":"SSL_read: 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":["generator","go","golang","unit-testing"],"created_at":"2024-08-03T15:01:15.283Z","updated_at":"2026-01-17T19:21:14.143Z","avatar_url":"https://github.com/hexdigest.png","language":"Go","funding_links":[],"categories":["Go Generate Tools","Go 生成工具","Go 代码生成工具","Go生成工具","编辑器插件","Libraries for creating HTTP middlewares"],"sub_categories":["Routers","路由器","代码分析"],"readme":"# GoUnit [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](https://github.com/hexdigest/gounit/blob/master/LICENSE) [![Build Status](https://travis-ci.org/hexdigest/gounit.svg?branch=master)](https://travis-ci.org/hexdigest/gounit) [![Coverage Status](https://coveralls.io/repos/github/hexdigest/gounit/badge.svg?branch=master)](https://coveralls.io/github/hexdigest/gounit?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/hexdigest/gounit)](https://goreportcard.com/report/github.com/hexdigest/gounit) [![GoDoc](https://godoc.org/github.com/hexdigest/gounit?status.svg)](http://godoc.org/github.com/hexdigest/gounit)\n\nGoUnit is a commandline tool that generates tests stubs based on source function or method signature.\n\nThere are plugins for\n* [Vim](https://github.com/hexdigest/gounit-vim)\n* [Emacs](https://github.com/hexdigest/GoUnit-Emacs)\n* [Atom](https://github.com/hexdigest/atom-gounit)\n* [Sublime](https://github.com/hexdigest/gounit-sublime)\n\n## Demo\n\n![demo](https://github.com/hexdigest/gounit-vim/blob/master/demo.gif)\n\n## Installation\n\n```\ngo get -u github.com/hexdigest/gounit/cmd/gounit\n```\n\n## Usage of GoUnit\n\nThis will generate test stubs for all functions and methods in file.go\n\n```\n  $ gounit gen -i file.go \n```\n\nRun `gounit help` for more options\n\n## Custom test templates\n\nIf you're not satisfied with the code produced by the default GoUnit test template you can always write your own!\nYou can use [minimock template](https://github.com/hexdigest/gounit/blob/master/templates/minimock) as an example.\nHere is how to add and switch to the custom template:\n\n```\n  $ curl https://raw.githubusercontent.com/hexdigest/gounit/master/templates/minimock \u003e minimock\n  $ gounit template add minimock\n  $ gounit template list\n\n    gounit templates installed\n\n       * default\n         minimock\n\n  $ gounit template use minimock\n```\n\nMinimock template produces test stubs that are aware of the mocks generated by the [minimock](https://github.com/gojuno/minimock) mock generator. \nBy using both of these tools you can automate the process of writing tests and focus on your test cases rather than routine operations.\n\n## Integration with editors and IDEs\n\nTo ease an integration of GoUnit with IDEs \"gen\" subcommand has a \"-json\" flag.\nWhen -json flag is passed GoUnit reads [JSON requests](https://github.com/hexdigest/gounit/blob/master/client.go#L5) from Stdin in a loop and produces [JSON responses](https://github.com/hexdigest/gounit/blob/master/client.go#L16) with generated test(s) that are written to Stdout.\nUsing this mode you can generate as many tests as you want by running GoUnit executable only once.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexdigest%2Fgounit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexdigest%2Fgounit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexdigest%2Fgounit/lists"}