coverage

package
v0.3.3-alpha Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineSummary

type LineSummary struct {
	Total   int
	Hit     int
	Partial int
	Miss    int
	Percent float64
}

LineSummary models Codecov-style hit/partial/miss line coverage.

type StatementSummary

type StatementSummary struct {
	Total   int
	Covered int
	Percent float64
}

StatementSummary mirrors go tool cover's statement coverage view.

type Summary

type Summary struct {
	Line      LineSummary
	Statement StatementSummary
}

Summary contains both line-based and statement-based coverage totals.

func Analyze

func Analyze(r io.Reader) (Summary, error)

Analyze parses a Go cover profile from r.

func AnalyzeProfile

func AnalyzeProfile(path string) (Summary, error)

AnalyzeProfile reads a Go cover profile and returns both Codecov-style line coverage and statement coverage, deduplicating repeated blocks produced by multi-package aggregators such as go-acc.

Jump to

Keyboard shortcuts

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