Change-Id: I1285ee047fd465f48028186ae04d4de60cc9969e
Reviewed-on: https://go-review.googlesource.com/c/go/+/569715
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: shuang cui <imcusg@gmail.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
cmd := testenv.Command(t, s.tool, args...)
b, err := cmd.CombinedOutput()
if err != nil {
- fmt.Fprintf(os.Stderr, "## %s output: %s\n", op, string(b))
+ fmt.Fprintf(os.Stderr, "## %s output: %s\n", op, b)
t.Fatalf("%q run error: %v", op, err)
}
output := strings.TrimSpace(string(b))
data, err := json.Marshal(val)
if err != nil {
// Should never happen.
- panic(fmt.Sprintf("failed to round-trip JSON %q: %s", string(line), err))
+ panic(fmt.Sprintf("failed to round-trip JSON %q: %s", line, err))
}
f.w.Write(data)
// Copy any trailing text. We expect at most a "\n" here, but
headerLines++
header, val, ok := strings.Cut(string(line), ":")
if !ok {
- h.printf("cgi: bogus header line: %s", string(line))
+ h.printf("cgi: bogus header line: %s", line)
continue
}
if !httpguts.ValidHeaderFieldName(header) {