report

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTable

func PrintTable(report Report, writer io.Writer, packages bool)

Prints the report to the terminal

Types

type Report

type Report struct {
	Total Summary   // Global coverage
	Files []Summary // Coverage by file
}

Report of the coverage results

func GenerateReport

func GenerateReport(coverprofile string, root string, exclusions []string, sortBy, order string, packages bool) (Report, error)

Generates a coverage report given the coverage profile file, and the following configurations: exclusions: packages to be excluded (if a package is excluded, all its subpackages are excluded as well) sortBy: the order in which the files will be sorted in the report (see sortResults) order: the direction of the the sorting

type Summary

type Summary struct {
	Name                                       string
	Blocks, Stmts, MissingBlocks, MissingStmts int
	BlockCoverage, StmtCoverage                float64
}

Coverage summary for a file or module

Jump to

Keyboard shortcuts

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