aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/cover/templates/cover-table.html
blob: 1f4925b79bf3181269e9d5f221cdd0ad0ca6fa58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style>
    body {
      background: white;
    }
    #content {
      color: rgb(70, 70, 70);
      margin-top: 50px;
    }
    th, td {
      text-align: left;
      border: 1px solid black;
    }
    th {
      background: gray;
    }
    tr:nth-child(2n+1) {
      background: #CCC
    }
    table {
      border-collapse: collapse;
      border: 1px solid black;
      margin-bottom: 20px;
    }
  </style>
</head>
<body>
<div>
  <table>
    <thead>
    <tr>
      <th>Name</th>
      <th>Covered / Total Lines / %</th>
      <th>Covered / Total PCs in File / %</th>
      <th>Covered / Total PCs in Function / %</th>
      <th>Covered / Total PCs in Covered Function / %</th>
      <th>Covered / Total Functions / %</th>
    </tr>
    </thead>
    <tbody id="content">
    {{range $i, $p := .}}
    <tr>
      <td>{{$p.name}}</td>
      <td>{{$p.lines}}</td>
      <td>{{$p.PCsInFiles}}</td>
      <td>{{$p.PCsInFuncs}}</td>
      <td>{{$p.PCsInCoveredFuncs}}</td>
      <td>{{$p.Funcs}}</td>
    </tr>
    {{end}}
    </tbody>
  </table>
</div>
</body>
</html>