@@ -218,7 +218,7 @@ func getHtmlReportMenu(allTableValues []table.TableValues) string {
218218 // insert menu items into sidebar
219219 for _ , tableValues := range allTableValues {
220220 if tableValues .MenuLabel != "" {
221- sb . WriteString ( fmt .Sprintf ( "<a href=\" #%s\" >%s</a>\n " , html .EscapeString (tableValues .Name ), html .EscapeString (tableValues .MenuLabel ) ))
221+ fmt .Fprintf ( & sb , "<a href=\" #%s\" >%s</a>\n " , html .EscapeString (tableValues .Name ), html .EscapeString (tableValues .MenuLabel ))
222222 }
223223 }
224224 sb .WriteString ("</div>\n " ) // end of sidebar
@@ -273,7 +273,7 @@ func createHtmlReport(allTableValues []table.TableValues, targetName string) (ou
273273` )
274274 for _ , tableValues := range allTableValues {
275275 // print the table name
276- sb . WriteString ( fmt .Sprintf ( "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (tableValues .Name ) ))
276+ fmt .Fprintf ( & sb , "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (tableValues .Name ))
277277 // if there's no data in the table, print a message and continue
278278 if len (tableValues .Fields ) == 0 || len (tableValues .Fields [0 ].Values ) == 0 {
279279 msg := NoDataFound
@@ -343,10 +343,10 @@ func createHtmlReportMultiTarget(allTargetsTableValues [][]table.TableValues, ta
343343 if targetTableValues .HasRows && getCustomHTMLMultiTargetRenderer (targetTableValues .Name ) == nil {
344344 // print the table name only one time per table
345345 if targetIndex == 0 {
346- sb . WriteString ( fmt .Sprintf ( "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (targetTableValues .Name ) ))
346+ fmt .Fprintf ( & sb , "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (targetTableValues .Name ))
347347 }
348348 // print the target name
349- sb . WriteString ( fmt .Sprintf ( "<h3>%s</h3>\n " , targetName ) )
349+ fmt .Fprintf ( & sb , "<h3>%s</h3>\n " , targetName )
350350 // if there's no data in the table, print a message and continue
351351 if len (targetTableValues .Fields ) == 0 || len (targetTableValues .Fields [0 ].Values ) == 0 {
352352 sb .WriteString ("<p>" + NoDataFound + "</p>\n " )
@@ -363,7 +363,7 @@ func createHtmlReportMultiTarget(allTargetsTableValues [][]table.TableValues, ta
363363 }
364364 // print the multi-target table, if any
365365 if len (oneTableValuesForAllTargets ) > 0 {
366- sb . WriteString ( fmt .Sprintf ( "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (oneTableValuesForAllTargets [0 ].Name ) ))
366+ fmt .Fprintf ( & sb , "<h2 id=\" %[1]s\" >%[1]s</h2>\n " , html .EscapeString (oneTableValuesForAllTargets [0 ].Name ))
367367 if renderer := getCustomHTMLMultiTargetRenderer (oneTableValuesForAllTargets [0 ].Name ); renderer != nil {
368368 sb .WriteString (renderer (oneTableValuesForAllTargets , targetNames ))
369369 } else {
0 commit comments