Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
</body>
</html>
`)HTMLFooter closes the tags for the HTML page.
View Source
var HTMLHeader = fmt.Sprintf(`
<!DOCTYPE html>
<html>
<style type="text/css">
<!--
.tab { margin-left: 50px; }
.styleheader {color: white; size: A4}
.covered {color: green; size: A3}
.notcovered {color: red; size: A3}
.ignored {color: white; size: A4}
.values {color: yellow; size: A3}
table, th, td { border: 1px solid white; text-align: center}
.braces {color: white; size: A3}
-->
</style>
<body style="background-color:rgb(0,0,0); font-family: Arial">
`)
HTMLHeader sets up an HTML page with the right style format
Functions ¶
func GetHTMLCoverageValuesDisplay ¶
func GetHTMLCoverageValuesDisplay(coverageValues *coveragecalculator.CoverageValues) string
GetHTMLCoverageValuesDisplay is a helper method to display coverage values inside a HTML table.
func GetHTMLDisplay ¶
func GetHTMLDisplay(coverageData []coveragecalculator.TypeCoverage, displayRules DisplayRules) string
GetHTMLDisplay is a helper method to display API Coverage details in json-like format inside a HTML page.
Types ¶
type DisplayRules ¶
type DisplayRules struct { PackageNameRule func(packageName string) string TypeNameRule func(typeName string) string FieldRule func(coverage *coveragecalculator.FieldCoverage) string }
DisplayRules provides a mechanism for repos to define their own display rules. DisplayHelper methods can use these rules to define how to display results.
Click to show internal directories.
Click to hide internal directories.