{"id":16103206,"url":"https://github.com/icyflame/gospec","last_synced_at":"2026-04-13T18:01:34.662Z","repository":{"id":150350386,"uuid":"236165164","full_name":"icyflame/gospec","owner":"icyflame","description":"A bash function that prettifies the output of `go test`","archived":false,"fork":false,"pushed_at":"2020-03-03T06:52:46.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T06:29:48.004Z","etag":null,"topics":["bash","golang","golang-testing"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/icyflame.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":"2020-01-25T12:08:24.000Z","updated_at":"2020-04-10T08:19:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b55782a0-320a-4f61-b958-8a3f29f4f6cc","html_url":"https://github.com/icyflame/gospec","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/icyflame/gospec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyflame%2Fgospec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyflame%2Fgospec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyflame%2Fgospec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyflame%2Fgospec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icyflame","download_url":"https://codeload.github.com/icyflame/gospec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyflame%2Fgospec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31764317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"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":["bash","golang","golang-testing"],"created_at":"2024-10-09T18:56:18.426Z","updated_at":"2026-04-13T18:01:34.638Z","avatar_url":"https://github.com/icyflame.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gospec\n\n\u003e A bash function that prettifies the output of `go test`\n\n[![asciicast](https://asciinema.org/a/301631.svg)](https://asciinema.org/a/301631)\n\n## Usage\n\n```\n$ gospec --help\ngospec\n\ngospec prettifies the output of `go test`\n\nUsage:\n    gospec [options] [package] [test-regex]\n\nAvailable options:\n    [ --no-color  | -C ] =\u003e do not use colors when printing the summarized output\n    [ --no-output | -O ] =\u003e do not print output for failing tests\n    [ --summary   | -S ] =\u003e print a list of passing and failing tests\n    [ --passthru  | -P ] =\u003e Run the Go test command, don't change anything in the output\n\nExamples:\n    # Run complete test suite and print failing test output + list of failing tests\n    gospec\n\n    # Same as above: Don't use colors in the output\n    gospec -C\n\n    # Run complete test suite and print only the list of failing tests\n    gospec -O\n\n    # Run complete test suite and the list of passing and failing tests\n    gospec -O -S\n\n    # Run tests matching Percent in the utils package\n    gospec ./utils Percent\n\n    # Run all tests that match the given regex\n    gospec \"/Base\"\n\n    # Pass through to the underlying go test command: Don't mangle `go test`'s output\n    gospec -P\n\n    # Pass through to the underlying go test command: Run tests in this package that match the given\n    # regex\n    gospec -P ./package regex\n\nWebpage:\n    https://github.com/icyflame/gospec\n```\n\n## Installation\n\n**Note:** `gospec` requires [`jq`][1] as a pre-requisite.\n\n`gospec` is a bash function. You can use it by placing the file in your path and\nmaking it an executable. I recommend placing it in `$HOME/bin` and adding\n`$HOME/bin` to your path. You can place it in any folder that is listed in your\n`$PATH` variable.\n\n```sh\n# Download the gospec bash function into a file in this directory\ncurl \"https://raw.githubusercontent.com/icyflame/gospec/master/gospec\" \u003e \"$HOME/bin/gospec\"\nchmod +x \"$HOME/bin/gospec\"\n\n# Restart your termianl or source your bashrc/zshrc and check that gospec can\n# now be called\ngospec --help\n```\n\n## Why?\n\n`go test` is a great tool. But it's output is hugely lacking: the default output\nis a wall of white text; there's no colors, failed tests aren't even highlighted\nor summarized and printed at the end.\n\nWhen you compare it to `rspec`'s default output, `go test` is blown out of the\nwater. Rspec's output in the any format is concise, colored appropriately and\nprints the list of failing tests at the end.\n\nI have two requirements from any testing tool:\n\n- **Run a subset of all tests quickly:** I use this when I am writing a new test\n  or editing code that will affect an existing test.\n- **Ensure that the test suite is passing before `git push`:** I use this when I\n  am making changes that were requested in a review.\n\nGospec is opinionated. It doesn't print passing tests unless you use the\n`--summary` option. It prints the output of failing tests by default. The bash\nfunction is fairly small and simple, so my assumption is that anyone who wants a\ndifferent set of defaults will simply edit the bash function.\n\n## Limitations\n\n- Argument parsing in `gospec` is naive and works only if you pass them in the\n  pre-defined order: `gospec [-h|-P] -C -O -S [package] regex`. I intend to fix\n  this in a future release.\n\n## License\n\nCode inside this repo is licensed under the MIT License.\n\nCopyright (c) 2020 [Siddharth Kannan](https://icyflame.github.io)\n\n[1]: https://stedolan.github.io/jq/manual/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyflame%2Fgospec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficyflame%2Fgospec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyflame%2Fgospec/lists"}