diff options
| author | cuiweixie <cuiweixie@gmail.com> | 2022-09-04 19:18:50 +0800 |
|---|---|---|
| committer | Daniel Martà <mvdan@mvdan.cc> | 2022-09-07 07:03:10 +0000 |
| commit | ed530dbd077c8dbf680fabb1fb10da5239099e25 (patch) | |
| tree | 77eef2e44c8ca7827498582404dfe1088bda256b /src/testing/fuzz.go | |
| parent | f4bf9bceac20868fb692bacf02ee5b4ccd99b778 (diff) | |
| download | go-ed530dbd077c8dbf680fabb1fb10da5239099e25.tar.xz | |
testing: use strings.Builder
Change-Id: Ied8a3019f1e21c0e74c798d2b1b279a606a38554
Reviewed-on: https://go-review.googlesource.com/c/go/+/428279
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/testing/fuzz.go')
| -rw-r--r-- | src/testing/fuzz.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/fuzz.go b/src/testing/fuzz.go index e60ecadf25..87b60fc1bb 100644 --- a/src/testing/fuzz.go +++ b/src/testing/fuzz.go @@ -5,7 +5,6 @@ package testing import ( - "bytes" "errors" "flag" "fmt" @@ -14,6 +13,7 @@ import ( "path/filepath" "reflect" "runtime" + "strings" "time" ) @@ -379,7 +379,7 @@ func (f *F) Fuzz(ff any) { // fuzz worker. This would become very verbose, particularly during // minimization. Return the error instead, and let the caller deal // with the output. - var buf bytes.Buffer + var buf strings.Builder if ok := run(&buf, e); !ok { return errors.New(buf.String()) } |
