coverage

package
v0.0.0-...-ca961d3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(profilePath string) ([]*cover.Profile, error)

Types

type FileModel

type FileModel struct {
	FilePath       string
	LineInfo       []LineInfo
	UncoveredLines []int
	CoveredStmt    int
	TotalStmt      int
	Percent        float64
	SearchIndex    SearchIndex
}

func BuildFileModels

func BuildFileModels(profiles []*cover.Profile, dir string) ([]FileModel, error)

type LineInfo

type LineInfo struct {
	LineNo int
	Text   string
	Status LineStatus
}

type LineStatus

type LineStatus int
const (
	None LineStatus = iota
	Covered
	Uncovered
	Partial
)

type SearchIndex

type SearchIndex struct {
	Filename  string
	Functions []string
	Variables []string
	Content   string
}

type Totals

type Totals struct {
	CoveredStmt int
	TotalStmt   int
	Percent     float64
}

func ComputeTotals

func ComputeTotals(profiles []*cover.Profile) Totals

Jump to

Keyboard shortcuts

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