pkg/cover: unexport CSVHeader

No point for it to be a part of the package public interface.

Follow up to #2074
This commit is contained in:
Dmitry Vyukov 2020-09-26 18:05:38 +02:00
parent 5dd8aee810
commit 3bbd2f185f
2 changed files with 9 additions and 9 deletions

View File

@ -42,13 +42,6 @@ type symbol struct {
end uint64
}
var CSVHeader = []string{
"Filename",
"Function",
"Covered PCs",
"Total PCs",
}
func MakeReportGenerator(target *targets.Target, kernelObject, srcDir, buildDir string) (*ReportGenerator, error) {
rg := &ReportGenerator{
target: target,
@ -208,9 +201,16 @@ func getFunction(functions map[string]*function, name string) *function {
return f
}
var csvHeader = []string{
"Filename",
"Function",
"Covered PCs",
"Total PCs",
}
func (rg *ReportGenerator) generateCSV(w io.Writer, progs []Prog, files map[string]*file) error {
data := [][]string{
CSVHeader,
csvHeader,
}
for fname, file := range files {

View File

@ -197,7 +197,7 @@ func checkCSVReport(t *testing.T, CSVReport []byte) {
t.Fatal(err)
}
if !reflect.DeepEqual(lines[0], CSVHeader) {
if !reflect.DeepEqual(lines[0], csvHeader) {
t.Fatalf("Heading line in CSV doesn't match %v", lines[0])
}