coverage

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package coverage is for writing coverage reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coverage

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

func Load

func Load(inPath string) (*Coverage, error)

Load a Go coverprofile file. Generated files are excluded from the result.

func (*Coverage) CoverProfile

func (cov *Coverage) CoverProfile(outPath string) error

CoverProfile writes the coverage to a file in the Go "coverprofile" format.

func (*Coverage) Ratio

func (cov *Coverage) Ratio() float64

Ratio returns the ratio of covered statements over all statements. The value returned will always be between 0 and 1. If there are no statements then 1 is returned.

func (*Coverage) XML

func (cov *Coverage) XML(outPath string) error

XML writes the coverage to a file in the Cobertura-style XML format.

Jump to

Keyboard shortcuts

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