百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

gocovsh

> 测试质量
开源

在终端中使用 Go Coverage: 用于从命令行中探索 Go Coverage 报告的工具

387 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

在终端中使用 Go Coverage: 用于从命令行中探索 Go Coverage 报告的工具

gocovsh is a tool for exploring Go Coverage reports from the command line.

Don't skip the Giving back section!

Demo below

There is a Russian word Ковш (pronounced like "Kovsh") which means a ladle or a dipper. "The Big Dipper" is also a part of the constellation Ursa Major, thus the friendly dipper-shaped Gopher mascot, created by Michael Zolotov.

Installation

Using Homebrew

bash
brew install orlangure/tap/gocovsh

Pre-built binary

Grab your pre-built binary from the Releases page.

From source

bash
# install latest, probably unreleased version
go install github.com/orlangure/gocovsh@latest

# or install a specific version
go install github.com/orlangure/[email protected]

Usage

  1. Generate Go coverage report at your project's root with

    bash
    go test -cover -coverprofile coverage.out

    For more information about generating Go coverage reports, see my blog post.

  2. Run gocovsh at the same folder with coverage.out report and go.mod file (go.mod is required).

    bash
    gocovsh                        # show all files from coverage report
    git diff --name-only | gocovsh # only show changed files
    git diff | gocovsh             # show coverage on top of current diff
    gocovsh --profile profile.out  # for other coverage profile names
  3. Use j/k/enter/esc keys to explore the report. See built-in help for more key-bindings.

Themes

gocovsh supports 4 nice themes (using Catppuccin Theme project) and an ugly default one at this moment. To change the theme, set GOCOVSH_THEME environment variable to one of the following values: mocha, latte, frappe or macchiato:

bash
GOCOVSH_THEME=mocha gocovsh
GOCOVSH_THEME=latte gocovsh
GOCOVSH_THEME=frappe gocovsh
GOCOVSH_THEME=macchiato gocovsh

To always use the same theme, add export GOCOVSH_THEME= to your ~/.bashrc, ~/.zshrc or any other file that you use for shell configuration.

Giving back

This is a free and open source project that hopefully helps its users, at least a little. Even though I don't need donations to support it, I understand that there are people that wish to give back anyway. If you are one of them, I encourage you to plant some trees with Tree Nation

If you want me to know about your contribution, make sure to use [email protected] as the recipient email.

Thank you!

Demo

Viewing Go code coverage reports

Only show Go code coverage of changed files

Go code coverage on top of git diff

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goclicoveragecoverage-reportgo

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.