mirror of
https://github.com/golang/go
synced 2024-11-02 13:42:29 +00:00
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:
parent
f1f85f4ab5
commit
2cbcf36ede
1 changed files with 1 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue