Help us shape the future of Go! Take the 2026 Go Developer Survey

coverage

command
v0.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

coverage runs Go tests with coverage and checks that the total coverage percentage meets a per-component target.

Usage:

coverage [-target=N] <packages...>

It runs "go test -race -coverprofile -covermode=atomic" on the given packages, then uses "go tool cover -func" to extract the total coverage percentage and compares it against the target for the component. The default target is 80%. Components with a different target are listed below. The -target flag overrides both the default and per-component targets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL