diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-16 22:56:11 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-16 22:56:11 -0700 |
commit | 6f8e7db1ac5ddd21b8e3fcc39a1e30fde9b62c3a (patch) | |
tree | 8f0247b646291577f54f7d164b7fed675388c72c /compat/json/compat.go | |
parent | debef01cc500fb9368e1d6d0206a32ca358a8c98 (diff) | |
parent | 0d23080e1f2af81d8d4656c3b72791b26f52f361 (diff) |
Merge branch 'lukeshu/perf'
Diffstat (limited to 'compat/json/compat.go')
-rw-r--r-- | compat/json/compat.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/json/compat.go b/compat/json/compat.go index c96470d..0b86732 100644 --- a/compat/json/compat.go +++ b/compat/json/compat.go @@ -15,6 +15,7 @@ import ( "strconv" "git.lukeshu.com/go/lowmemjson" + "git.lukeshu.com/go/lowmemjson/internal/fastio" ) //nolint:stylecheck // ST1021 False positive; these aren't comments on individual types. @@ -172,7 +173,7 @@ func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error { } func Valid(data []byte) bool { - formatter := lowmemjson.NewReEncoder(io.Discard, lowmemjson.ReEncoderConfig{ + formatter := lowmemjson.NewReEncoder(fastio.Discard, lowmemjson.ReEncoderConfig{ Compact: true, }) _, err := formatter.Write(data) |