Change-Id: Ifb51cb4ed98a93742ce4b221137a0ad73b939b06
Reviewed-on: https://go-review.googlesource.com/c/go/+/428286
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
if err != nil {
t.Fatal(err)
}
- var out bytes.Buffer
+ var out strings.Builder
scan := bufio.NewScanner(bytes.NewReader(entireHTML))
in := false
for scan.Scan() {
import (
"bufio"
- "bytes"
"cmd/internal/browser"
"fmt"
"html/template"
// colors generates the CSS rules for coverage colors.
func colors() template.CSS {
- var buf bytes.Buffer
+ var buf strings.Builder
for i := 0; i < 11; i++ {
fmt.Fprintf(&buf, ".cov%v { color: %v }\n", i, rgb(i))
}