diff options
| author | Joey Jiao <joeyjiaojg@gmail.com> | 2021-05-28 13:44:58 +0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-06-23 19:36:32 +0200 |
| commit | fe4ab389eae32291227364d90a057178ae96ac56 (patch) | |
| tree | b90c2594c2b9a956a821e9b12a1c65a994cb5b66 /pkg/cover/html.go | |
| parent | aba2b2fb3544d9e42991237c13d8cada421deda5 (diff) | |
pkg/cover: add line number in cover page
Diffstat (limited to 'pkg/cover/html.go')
| -rw-r--r-- | pkg/cover/html.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/cover/html.go b/pkg/cover/html.go index f1cd96205..bdbd3bbf4 100644 --- a/pkg/cover/html.go +++ b/pkg/cover/html.go @@ -342,6 +342,10 @@ func fileContents(file *file, lines [][]byte, haveProgs bool) string { } } buf.WriteString("</td><td>") + for i := range lines { + buf.WriteString(fmt.Sprintf("%d\n", i+1)) + } + buf.WriteString("</td><td>") for i, ln := range lines { start := 0 cover := append(lineCover[i+1], lineCoverChunk{End: backend.LineEnd}) |
