coverage

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(w io.Writer, profile *Profile) error

func WriteFile

func WriteFile(path string, profile *Profile) error

Types

type Entry

type Entry struct {
	Raw     string
	File    string // extracted file path (package-qualified)
	NumStmt int
	Count   int
}

type ModuleMatcher

type ModuleMatcher struct {
	ModulePrefix string
	Matcher      *ignore.Matcher
}

type Profile

type Profile struct {
	Mode    string // e.g. "set", "count", "atomic"
	Entries []Entry
}

func Filter

func Filter(profile *Profile, matcher *ignore.Matcher, modulePrefix string) *Profile

func FilterMultiModule

func FilterMultiModule(profile *Profile, modules []ModuleMatcher) *Profile

func Parse

func Parse(r io.Reader) (*Profile, error)

type Stats

type Stats struct {
	Statements int
	Covered    int
	Files      []string
}

func ComputeStats

func ComputeStats(profile *Profile) Stats

func (Stats) Percent

func (s Stats) Percent() float64

func (Stats) String

func (s Stats) String() string

Jump to

Keyboard shortcuts

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