cmd/internal: use fmt.Fprintf

Change-Id: Ifa78c98bf919ea62136f19b2bad0a8ee33afc646
Reviewed-on: https://go-review.googlesource.com/c/go/+/435695
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
This commit is contained in:
cuiweixie 2022-09-28 10:44:12 +08:00 committed by Gopher Robot
parent f1f85f4ab5
commit 2cbcf36ede

View file

@ -343,7 +343,7 @@ func (c *Converter) writeEvent(e *event) {
js, err := json.Marshal(e)
if err != nil {
// Should not happen - event is valid for json.Marshal.
c.w.Write([]byte(fmt.Sprintf("testjson internal error: %v\n", err)))
fmt.Fprintf(c.w, "testjson internal error: %v\n", err)
return
}
js = append(js, '\n')