{"id":36726594,"url":"https://github.com/nikandfor/cover","last_synced_at":"2026-01-12T12:02:17.143Z","repository":{"id":63068274,"uuid":"454482371","full_name":"nikandfor/cover","owner":"nikandfor","description":"Go cover tool for maximum productivity.","archived":false,"fork":false,"pushed_at":"2025-02-13T02:04:23.000Z","size":1091,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T15:50:39.241Z","etag":null,"topics":["cover","coverage","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/nikandfor.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":"2022-02-01T17:25:09.000Z","updated_at":"2025-02-14T02:36:18.000Z","dependencies_parsed_at":"2024-01-05T00:51:19.681Z","dependency_job_id":"3232a345-7c8d-4dc2-8e99-a383ab001c31","html_url":"https://github.com/nikandfor/cover","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nikandfor/cover","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fcover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fcover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fcover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fcover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikandfor","download_url":"https://codeload.github.com/nikandfor/cover/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fcover/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cover","coverage","go","golang","testing"],"created_at":"2026-01-12T12:02:17.000Z","updated_at":"2026-01-12T12:02:17.088Z","avatar_url":"https://github.com/nikandfor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://pkg.go.dev/badge/github.com/nikandfor/cover)](https://pkg.go.dev/github.com/nikandfor/cover?tab=doc)\n[![Go workflow](https://github.com/nikandfor/cover/actions/workflows/go.yml/badge.svg)](https://github.com/nikandfor/cover/actions/workflows/go.yml)\n[![CircleCI](https://circleci.com/gh/nikandfor/cover.svg?style=svg)](https://circleci.com/gh/nikandfor/cover)\n[![codecov](https://codecov.io/gh/nikandfor/cover/tags/latest/graph/badge.svg)](https://codecov.io/gh/nikandfor/cover)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nikandfor/cover)](https://goreportcard.com/report/github.com/nikandfor/cover)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/nikandfor/cover?sort=semver)\n\n# cover\nGo cover tool for maximum productivity.\n\nIt is similar to `go tool cover -html=cover.out` but not leaving the terminal. It was inspired by [gocovsh](https://github.com/orlangure/gocovsh) but I wanted it to work a bit different.\n\nThe aim is to help me in writing tests spending as little attention and key presses as possible.\n\n![Screenshot](./docs/screenshot.png)\n\n### Key features\n\n* You dont leave the terminal.\n* It's non-interactive like ls, cd and most of cli commands. Life is too short to navigate menus.\n* It's precise, it only output the code you asked.\n\n### How to use\n\nGo to the project dir, it requires to be inside the project to work (go.mod needed).\n\nCreate coverage profile as usual: `go test -coverprofile cover.out ./...`.\n\nRender it `cover` (`cover.out` is the default profile name). By default it renders all files in the current directory recursive (`./...`).\n\nBut the best part is filters. You determine what coverage target you want, you may have simple rule (all files at least 80% covered) or as much flexible as you want (separate coverage target for each file, package or function, exclude experimental subpackages or unexported functions).\n\nThen you may write your tests with very little distraction: no typing, no clicking, no switching to browser and back, very little of scrolling.\n\nYou may also use it as an automated checker as it can return exit code 1 if something is selected. You set the rules and eliminate what breaks them.\n```\ncover --exit-code \u003ctarget_filters...\u003e \u0026\u0026 echo \"You are covered!\" || echo \"There is something to cover\"\n```\n\n### Filters\n\nSelect by path. Paths are relative to the current directory.\n```\n. # not recursive\n./wire\ntlog.go\n```\n\nSelect by package name, type name, function name or combined\n```\nwire\nEncoder\nAppendValue\nwire.Encoder.AppendValue\ngithub.com/nikandfor/tlog/ext/tlflag.OpenWriter\n```\n\nFile filter is a glob, function filter is a regexp.\n```\n./ext/tl*\n\nwire.Encoder.Append.+\n```\n\nFilter by coverage.\n```\ntlog.go:b70  # filter by file name, then by coverage: *b* for below, 70 is percent\n             # Select all functions in a file with coverage below 70%\n\n# there are 'b' (below) or 'l' (less then) and 'a' (above) or 'g' (greater then) filters\n\nLogger:b80:a10  # all methods of Logger with coverage from 10% to 80%\n:b80            # every function in the current directory covered below 80% recursive\n\n# function coverage is compared by default, but if `...` wildcard path filter suffix is used then file total coverage is compared.\n\nwire:l80     # functions with less than 80% coverage\next/...:l80  # files with less than 80% total coverage\n```\n\nNegative filter. Filter prefixed with `!` unselects previously selected functions.\n```\n!unsafe.go\n!./ext/...\n\n!tq/parse\n!tlog.[a-z].+\n```\n\nFilter chaining.\n```\n# quotes to prevent shell substitution\n\n./ext/... '!tlgraylog'                 # extensions except tlgraylog\n./wire/ '!Encoder' '!Decoder' '!:a80'  # functions in wire package except Encoder and Decoder methods and except well covered\n...:b80                                # files to cover\n```\n\n*Examples are from [tlog](https://github.com/nikandfor/tlog/).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikandfor%2Fcover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikandfor%2Fcover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikandfor%2Fcover/lists"}