diff --git a/internal/output/html.go b/internal/output/html.go index 5aa8e221a6..f64d742375 100644 --- a/internal/output/html.go +++ b/internal/output/html.go @@ -525,5 +525,5 @@ func PrintHTMLResults(vulnResult *models.VulnerabilityResults, outputWriter io.W tmpl := template.Must(template.New("").Funcs(funcMap).ParseFS(templates, TemplateDir)) // Execute template - return tmpl.ExecuteTemplate(outputWriter, "report_template.html", htmlResult) + return tmpl.ExecuteTemplate(outputWriter, "report.gohtml", htmlResult) } diff --git a/internal/output/html/package_table_template.html b/internal/output/html/package_table.gohtml similarity index 100% rename from internal/output/html/package_table_template.html rename to internal/output/html/package_table.gohtml diff --git a/internal/output/html/package_view.gohtml b/internal/output/html/package_view.gohtml new file mode 100644 index 0000000000..135a1962b5 --- /dev/null +++ b/internal/output/html/package_view.gohtml @@ -0,0 +1,2 @@ +{{ $allPackageResults := getAllPackageResults .}} +{{ template "package_table.gohtml" $allPackageResults }} diff --git a/internal/output/html/package_view_template.html b/internal/output/html/package_view_template.html deleted file mode 100644 index 8af5cbb96c..0000000000 --- a/internal/output/html/package_view_template.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ $allPackageResults := getAllPackageResults .}} -{{ template "package_table_template.html" $allPackageResults }} diff --git a/internal/output/html/report_template.html b/internal/output/html/report.gohtml similarity index 93% rename from internal/output/html/report_template.html rename to internal/output/html/report.gohtml index 61986c82c7..d0de9fef80 100644 --- a/internal/output/html/report_template.html +++ b/internal/output/html/report.gohtml @@ -39,7 +39,7 @@

Scanning Results

Vulnerable Package Summary

- {{template "package_view_template.html" .EcosystemResults}} + {{template "package_view.gohtml" .EcosystemResults}}
@@ -54,7 +54,7 @@

Source: {{ .Source }}

{{ .HTMLVulnCount.Called }} known vulnerabilities found.

- {{template "vuln_view_template.html" .}} {{ end }} + {{template "vuln_view.gohtml" .}} {{ end }}
{{ end }} diff --git a/internal/output/html/vuln_table_template.html b/internal/output/html/vuln_table.gohtml similarity index 100% rename from internal/output/html/vuln_table_template.html rename to internal/output/html/vuln_table.gohtml diff --git a/internal/output/html/vuln_view_template.html b/internal/output/html/vuln_view.gohtml similarity index 82% rename from internal/output/html/vuln_view_template.html rename to internal/output/html/vuln_view.gohtml index c2295fccc2..c69a7a1960 100644 --- a/internal/output/html/vuln_view_template.html +++ b/internal/output/html/vuln_view.gohtml @@ -1,7 +1,7 @@ {{$calledVulns := getAllVulns .PackageResults true}} {{$uncalledVulns := getAllVulns .PackageResults false}} {{ if ne .CalledPackageCount 0}} -{{template "vuln_table_template.html" $calledVulns}} +{{template "vuln_table.gohtml" $calledVulns}} {{ end }} {{ if ne .UncalledPackageCount 0}} @@ -13,7 +13,7 @@

Uncalled vulnerabilities

Found {{ .UncalledPackageCount }} package(s) with issues, {{.HTMLVulnCount.Uncalled }} known vulnerabilities found.

- {{template "vuln_table_template.html" $uncalledVulns }} + {{template "vuln_table.gohtml" $uncalledVulns }} {{ end }}