cobertura

package
v0.0.0-...-6061e1a Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	XMLName xml.Name `xml:"class"`

	Filename       string         `xml:"filename,attr"`
	LinesContainer LinesContainer `xml:"lines"`
}

type ClassesContainer

type ClassesContainer struct {
	XMLName xml.Name `xml:"classes"`

	Classes []Class `xml:"class"`
}

type DefaultLoader

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

func NewReportLoader

func NewReportLoader(sourceDir string) *DefaultLoader

func (*DefaultLoader) Load

func (l *DefaultLoader) Load(coverageFile string) (coverage.Report, error)

type Line

type Line struct {
	XMLName xml.Name `xml:"line"`

	Number int `xml:"number,attr"`
	Hits   int `xml:"hits,attr"`
}

type LinesContainer

type LinesContainer struct {
	XMLName xml.Name `xml:"lines"`

	Lines []Line `xml:"line"`
}

type Package

type Package struct {
	XMLName xml.Name `xml:"package"`

	Name             string           `xml:"name,attr"`
	ClassesContainer ClassesContainer `xml:"classes"`
}

type PackageContainer

type PackageContainer struct {
	XMLName xml.Name `xml:"packages"`

	Packages []Package `xml:"package"`
}

type Report

type Report struct {
	XMLName xml.Name `xml:"coverage"`

	ReportSources    ReportSources    `xml:"sources"`
	PackageContainer PackageContainer `xml:"packages"`
	// contains filtered or unexported fields
}

func (*Report) GetCoverageData

func (r *Report) GetCoverageData(_ string, srcDir string, pkg string, fileName string, lineNumber int) (*domain.CoverageData, bool)

type ReportSources

type ReportSources struct {
	XMLName xml.Name `xml:"sources"`

	Sources []string `xml:"source"`
}

Jump to

Keyboard shortcuts

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