...

Package coverdata

import "github.com/bazelbuild/rules_go/go/tools/coverdata"
Overview
Index

Overview ▾

Package coverdata provides a registration function for files with coverage instrumentation.

This package is part of the Bazel Go rules, and its interface should not be considered public. It may change without notice.

Variables

Contains all coverage data for the program.

var (
    Counters = make(map[string][]uint32)
    Blocks   = make(map[string][]testing.CoverBlock)
)

func RegisterFile

func RegisterFile(fileName string, counter []uint32, pos []uint32, numStmts []uint16)

RegisterFile causes the coverage data recorded for a file to be included in program-wide coverage reports. This should be called from init functions in packages with coverage instrumentation.