summaryrefslogtreecommitdiff
path: root/encode.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-25 23:11:06 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-25 23:20:18 -0700
commite483afa206686ce748ad270140f99fad9d713aad (patch)
tree2f65755ece7059579e902132cf0e44cb0fbbb0d6 /encode.go
parentf834aaeb56b929ed06e0545a589b7dd82b4602d3 (diff)
Delete things I don't want to document
Diffstat (limited to 'encode.go')
-rw-r--r--encode.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/encode.go b/encode.go
index acef214..85584ef 100644
--- a/encode.go
+++ b/encode.go
@@ -1,4 +1,4 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
+// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com>
//
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -82,19 +82,6 @@ func (enc *Encoder) Encode(obj any) (err error) {
return nil
}
-// Encode encodes a value to w.
-//
-// If w is an *ReEncoder, then the inner backslash-escaping of
-// double-encoded ",string" tagged string values obeys the
-// *ReEncoder's BackslashEscape policy.
-//
-// Does not write a trailing newline or other whitespace; if you will
-// be encoding multiple values to w, then you should instead use an
-// *Encoder object, as some JSON values need whitespace between them.
-func Encode(w io.Writer, obj any) (err error) {
- return NewEncoder(w).Encode(obj)
-}
-
var (
encodableType = reflect.TypeOf((*Encodable)(nil)).Elem()
jsonMarshalerType = reflect.TypeOf((*json.Marshaler)(nil)).Elem()