type 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 MakeCovDataReader(vis CovDataVisitor, indirs []string, verbosityLevel int, flags CovDataReaderFlags, matchpkg func(name string) bool) *CovDataReader { … } type CovDataVisitor … type CovDataReaderFlags … const CovDataReaderNoFlags … const PanicOnError … const PanicOnWarning … func (r *CovDataReader) Visit() error { … } func (r *CovDataReader) verb(vlevel int, s string, a ...interface{ … } func (r *CovDataReader) warn(s string, a ...interface{ … } func (r *CovDataReader) fatal(s string, a ...interface{ … } // visitPod examines a coverage data 'pod', that is, a meta-data file and // zero or more counter data files that refer to that meta-data file. func (r *CovDataReader) visitPod(p pods.Pod) error { … } func (r *CovDataReader) processPackage(mfname string, pd *decodemeta.CoverageMetaDataDecoder, pkgIdx uint32) error { … }