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

coverage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageCoverage

type PackageCoverage struct {
	PackagePath string  `json:"package_path"`
	Coverage    float64 `json:"coverage"` // Percentage (0-100)
	Error       string  `json:"error"`    // Empty if successful
	Skipped     bool    `json:"skipped"`  // True if no tests found
}

PackageCoverage represents coverage data for a single package

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes go test -cover for packages

func NewRunner

func NewRunner(timeoutSeconds int) *Runner

NewRunner creates a new coverage runner

func (*Runner) RunCoverage

func (r *Runner) RunCoverage(projectPath string, excludePatterns []string) ([]*PackageCoverage, error)

RunCoverage executes tests and extracts coverage for all packages in projectPath

Jump to

Keyboard shortcuts

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