Documentation ¶
Index ¶
Constants ¶
View Source
const ProjectURL = "https://github.com/matm/gocov-html"
ProjectURL is the project's site on GitHub.
Variables ¶
This section is empty.
Functions ¶
func HTMLReportCoverage ¶ added in v1.4.0
func HTMLReportCoverage(r io.Reader, opts ReportOptions) error
HTMLReportCoverage outputs an HTML report on stdout by parsing JSON data generated by axw/gocov. The css parameter is an absolute path to a custom stylesheet. Use an empty string to use the default stylesheet available.
Types ¶
type Beautifier ¶ added in v1.4.0
type Beautifier interface { // Name is the name of the theme. Name() string // Description is a single line comment about the theme. Description() string Assets() StaticAssets // Template is the structure of the page that will be rendered. // This code is generated by pkg/theme/generator.go. Template() *template.Template // Data is the content used by the template. // This code is generated by pkg/theme/generator.go. Data() *templateData }
Beautifier defines a theme used for rendering the HTML coverage stats.
type ReportOptions ¶ added in v1.4.0
type ReportOptions struct { // LowCoverageOnTop puts low coverage functions first. LowCoverageOnTop bool // Stylesheet is the path to a custom CSS file. Stylesheet string // CoverageMin filters out all functions whose code coverage is smaller than it is. CoverageMin uint8 // CoverageMax filters out all functions whose code coverage is greater than it is. CoverageMax uint8 }
ReportOptions holds various options used when generating the final HTML report.
type StaticAssets ¶ added in v1.4.0
StaticAssets sets all assets required for a theme.
Click to show internal directories.
Click to hide internal directories.