summaryrefslogtreecommitdiff
path: root/compat/json/compat.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-18 14:54:36 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-18 14:58:55 -0700
commitb2b51abfdc2eaefe6cf4aaf8645bbc7c52d89ff9 (patch)
tree59494397a1c7beb8d006863edc948b825aa1a533 /compat/json/compat.go
parent1b773c966cdb6b38cc4bc73e218793db3a9442ba (diff)
fastio: NewAllWriter: Add a special case for io.Discard
Diffstat (limited to 'compat/json/compat.go')
-rw-r--r--compat/json/compat.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/compat/json/compat.go b/compat/json/compat.go
index 0b86732..c96470d 100644
--- a/compat/json/compat.go
+++ b/compat/json/compat.go
@@ -15,7 +15,6 @@ 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.
@@ -173,7 +172,7 @@ func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error {
}
func Valid(data []byte) bool {
- formatter := lowmemjson.NewReEncoder(fastio.Discard, lowmemjson.ReEncoderConfig{
+ formatter := lowmemjson.NewReEncoder(io.Discard, lowmemjson.ReEncoderConfig{
Compact: true,
})
_, err := formatter.Write(data)