Documentation
¶
Index ¶
Constants ¶
const ( CovDataReaderNoFlags CovDataReaderFlags = 0 PanicOnError = 1 << iota PanicOnWarning )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CovDataReader ¶
type CovDataReader struct {
// contains filtered or unexported fields
}
CovDataReader is a general-purpose helper/visitor object for reading coverage data files in a structured way. Clients create a CovDataReader to process a given collection of coverage data file directories, then pass in a visitor object with methods that get invoked at various important points. CovDataReader is intended to facilitate common coverage data file operations such as merging or intersecting data files, analyzing data files, or dumping data files.
func MakeCovDataReader ¶
func MakeCovDataReader(vis CovDataVisitor, indirs []string, verbosityLevel int, flags CovDataReaderFlags, matchpkg func(name string) bool) *CovDataReader
MakeCovDataReader creates a CovDataReader object to process the given set of input directories. Here 'vis' is a visitor object providing methods to be invoked as we walk through the data, 'indirs' is the set of coverage data directories to examine, 'verbosityLevel' controls the level of debugging trace messages (zero for off, higher for more output), 'flags' stores flags that indicate what to do if errors are detected, and 'matchpkg' is a caller-provided function that can be used to select specific packages by name (if nil, then all packages are included).
func (*CovDataReader) Visit ¶
func (r *CovDataReader) Visit() error
type CovDataReaderFlags ¶
type CovDataReaderFlags uint32
type CovDataVisitor ¶
type CovDataVisitor interface { BeginPod(p pods.Pod) EndPod(p pods.Pod) VisitMetaDataFile(mdf string, mfr *decodemeta.CoverageMetaFileReader) BeginCounterDataFile(cdf string, cdr *decodecounter.CounterDataReader, dirIdx int) EndCounterDataFile(cdf string, cdr *decodecounter.CounterDataReader, dirIdx int) VisitFuncCounterData(payload decodecounter.FuncPayload) EndCounters() BeginPackage(pd *decodemeta.CoverageMetaDataDecoder, pkgIdx uint32) EndPackage(pd *decodemeta.CoverageMetaDataDecoder, pkgIdx uint32) VisitFunc(pkgIdx uint32, fnIdx uint32, fd *coverage.FuncDesc) Finish() }