coverage

package
v0.0.0-...-d25a125 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: Apache-2.0, BSD-3-Clause, MIT Imports: 1 Imported by: 18

Documentation

Overview

Package coverage provides an interface through which Go coverage data can be collected, converted to kcov format, and exposed to userspace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available returns whether any coverage data is available.

func ClearCoverageData

func ClearCoverageData()

ClearCoverageData clears existing coverage data.

func ConsumeCoverageData

func ConsumeCoverageData(w io.Writer) int

ConsumeCoverageData builds the collection of covered PCs.

func EnableReport

func EnableReport(w io.WriteCloser)

EnableReport sets up coverage reporting.

func InitCoverageData

func InitCoverageData()

InitCoverageData initializes global kcov-related data structures.

func KcovSupported

func KcovSupported() bool

KcovSupported returns whether the kcov interface should be made available.

func Report

func Report() error

Report writes out a coverage report with all blocks that have been covered.

func Symbolize

func Symbolize(out io.Writer, pc uint64) error

Symbolize writes out information about the block corresponding to pc.

func WriteAllBlocks

func WriteAllBlocks(out io.Writer) error

WriteAllBlocks writes out all PCs along with their corresponding position in the source code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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