Documentation ¶
Overview ¶
Package calc contains the various coverage calculator implementations.
Index ¶
Constants ¶
View Source
const StrategyLines = "lines"
View Source
const StrategyStatements = "statements"
View Source
const VHead = "latest"
Variables ¶
View Source
var Issue5Failing []byte
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator interface {
CoverageByPackage([]*cover.Profile) CoverageSummary
}
func New ¶
func New(version string) (Calculator, error)
type CoverageByFile ¶
type CoverageByFile map[string]map[string]CoverageCounts
CoverageByFile represents the statement coverage after parsing as a map[package]map[file]coverage.
type CoverageByFileLines ¶
CoverageByFileLines represents the line coverage after parsing as a map[package]map[file]map[line]covered.
type CoverageCounts ¶
type CoverageCounts struct{ Covered, Uncovered int }
func (CoverageCounts) Decimal ¶
func (cc CoverageCounts) Decimal() int
func (CoverageCounts) Float ¶ added in v0.0.4
func (cc CoverageCounts) Float() float64
type CoverageSummary ¶
type CoverageSummary []CoverageSummaryElement
CoverageSummary is a per-package coverage summary
type CoverageSummaryElement ¶
type CoverageSummaryElement struct { Package string Coverage int // Rounded integer ratio to 1000, e.g. 0.9016 -> 902. CoverageCounts }
Click to show internal directories.
Click to hide internal directories.