summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-10 19:58:52 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-10 21:44:42 -0700
commit0ce1d3e727ea347c3588f96be8a356fa6ea3bc0e (patch)
tree814b6a2d689fdba1266f59cf3a19079d1b99f354
parente9f3bdc767027d134a072e09f16bcccac75fa59f (diff)
tree-wide: Update various references from Go 1.18 to Go 1.20
-rw-r--r--README.md18
-rw-r--r--compat/json/README.md12
-rw-r--r--decode.go2
-rw-r--r--encode.go2
-rw-r--r--internal/jsonstruct/struct.go2
5 files changed, 18 insertions, 18 deletions
diff --git a/README.md b/README.md
index 108f3dc..4ef4038 100644
--- a/README.md
+++ b/README.md
@@ -141,17 +141,17 @@ These are streaming variants of the standard `json.Unmarshaler` and
<!-- packages -->
[`lowmemjson`]: https://pkg.go.dev/git.lukeshu.com/go/lowmemjson
[`lowmemjson/compat/json`]: https://pkg.go.dev/git.lukeshu.com/go/lowmemjson/compat/json
-[`encoding/json`]: https://pkg.go.dev/encoding/json@go1.18
+[`encoding/json`]: https://pkg.go.dev/encoding/json@go1.20
<!-- encoding/json symbols -->
-[`json.Marshaler`]: https://pkg.go.dev/encoding/json@go1.18#Marshaler
-[`json.Unmarshaler`]: https://pkg.go.dev/encoding/json@go1.18#Unmarshaler
-[`json.Marshal`]: https://pkg.go.dev/encoding/json@go1.18#Marshal
-[`json.Unmarshal`]: https://pkg.go.dev/encoding/json@go1.18#Unmarshal
-[`json.Compact`]: https://pkg.go.dev/encoding/json@go1.18#Compact
-[`json.HTMLEscape`]: https://pkg.go.dev/encoding/json@go1.18#HTMLEscape
-[`json.Indent`]: https://pkg.go.dev/encoding/json@go1.18#Indent
-[`json.Valid`]: https://pkg.go.dev/encoding/json@go1.18#Valid
+[`json.Marshaler`]: https://pkg.go.dev/encoding/json@go1.20#Marshaler
+[`json.Unmarshaler`]: https://pkg.go.dev/encoding/json@go1.20#Unmarshaler
+[`json.Marshal`]: https://pkg.go.dev/encoding/json@go1.20#Marshal
+[`json.Unmarshal`]: https://pkg.go.dev/encoding/json@go1.20#Unmarshal
+[`json.Compact`]: https://pkg.go.dev/encoding/json@go1.20#Compact
+[`json.HTMLEscape`]: https://pkg.go.dev/encoding/json@go1.20#HTMLEscape
+[`json.Indent`]: https://pkg.go.dev/encoding/json@go1.20#Indent
+[`json.Valid`]: https://pkg.go.dev/encoding/json@go1.20#Valid
<!-- lowmemjson symbols -->
[`lowmemjson.Encodable`]: https://pkg.go.dev/git.lukeshu.com/go/lowmemjson#Encodable
diff --git a/compat/json/README.md b/compat/json/README.md
index ec8dbed..531b87e 100644
--- a/compat/json/README.md
+++ b/compat/json/README.md
@@ -50,11 +50,11 @@ Types that are deprecated in `encoding/json` are not mimiced here:
<!-- packages -->
[`lowmemjson`]: https://pkg.go.dev/git.lukeshu.com/go/lowmemjson
-[`encoding/json`]: https://pkg.go.dev/encoding/json@go1.18
+[`encoding/json`]: https://pkg.go.dev/encoding/json@go1.20
<!-- symbols -->
-[`Delim`]: https://pkg.go.dev/encoding/json@go1.18#Delim
-[`Token`]: https://pkg.go.dev/encoding/json@go1.18#Token
-[`Decoder.Token`]: https://pkg.go.dev/encoding/json@go1.18#Decoder.Token
-[`InvalidUTF8Error`]: https://pkg.go.dev/encoding/json@go1.18#InvalidUTF8Error
-[`UnmarshalFieldError`]: https://pkg.go.dev/encoding/json@go1.18#UnmarshalFieldError
+[`Delim`]: https://pkg.go.dev/encoding/json@go1.20#Delim
+[`Token`]: https://pkg.go.dev/encoding/json@go1.20#Token
+[`Decoder.Token`]: https://pkg.go.dev/encoding/json@go1.20#Decoder.Token
+[`InvalidUTF8Error`]: https://pkg.go.dev/encoding/json@go1.20#InvalidUTF8Error
+[`UnmarshalFieldError`]: https://pkg.go.dev/encoding/json@go1.20#UnmarshalFieldError
diff --git a/decode.go b/decode.go
index 487bce4..1b6bdf2 100644
--- a/decode.go
+++ b/decode.go
@@ -232,7 +232,7 @@ func (dec *Decoder) DecodeThenEOF(ptr any) (err error) {
// json.Unmarshaler interface it also checks for the Decodable
// interface.
//
-// [documentation for encoding/json.Unmarshal]: https://pkg.go.dev/encoding/json@go1.18#Unmarshal
+// [documentation for encoding/json.Unmarshal]: https://pkg.go.dev/encoding/json@go1.20#Unmarshal
func (dec *Decoder) Decode(ptr any) (err error) {
ptrVal := reflect.ValueOf(ptr)
if ptrVal.Kind() != reflect.Pointer || ptrVal.IsNil() || !ptrVal.Elem().CanSet() {
diff --git a/encode.go b/encode.go
index 2d16891..2830ace 100644
--- a/encode.go
+++ b/encode.go
@@ -78,7 +78,7 @@ func NewEncoder(w io.Writer) *Encoder {
// may write partial output, whereas encodin/json would not have
// written anything.
//
-// [documentation for encoding/json.Marshal]: https://pkg.go.dev/encoding/json@go1.18#Marshal
+// [documentation for encoding/json.Marshal]: https://pkg.go.dev/encoding/json@go1.20#Marshal
func (enc *Encoder) Encode(obj any) (err error) {
if enc.isRoot {
enc.w.par.Reset()
diff --git a/internal/jsonstruct/struct.go b/internal/jsonstruct/struct.go
index 16c45de..20e82ca 100644
--- a/internal/jsonstruct/struct.go
+++ b/internal/jsonstruct/struct.go
@@ -63,7 +63,7 @@ func indexStructReal(typ reflect.Type) StructIndex {
ret.ByName[name] = len(ret.ByPos)
ret.ByPos = append(ret.ByPos, _field)
default:
- // To quote the encoding/json docs (version 1.18.4):
+ // To quote the encoding/json docs (version 1.20):
//
// If there are multiple fields at the same level, and that level is the
// least nested (and would therefore be the nesting level selected by the