gosec/report/html/writer.go
2021-05-20 10:16:42 +02:00

18 lines
322 B
Go

package html
import (
"html/template"
"io"
"github.com/securego/gosec/v2"
)
//WriteReport write a report in html format to the output writer
func WriteReport(w io.Writer, data *gosec.ReportInfo) error {
t, e := template.New("gosec").Parse(templateContent)
if e != nil {
return e
}
return t.Execute(w, data)
}