Update dependencies and build to go1.22

This commit is contained in:
Wim
2024-01-06 21:12:22 +01:00
parent 56e7bd01ca
commit c6efa7176e
1553 changed files with 3279516 additions and 1924371 deletions

View File

@@ -10,6 +10,7 @@ import (
var (
interfaceType = reflect.TypeOf((*interface{})(nil)).Elem()
stringType = reflect.TypeOf((*string)(nil)).Elem()
boolType = reflect.TypeOf((*bool)(nil)).Elem()
)
var valueDecoders []decoderFunc
@@ -127,12 +128,12 @@ func ptrValueDecoder(typ reflect.Type) decoderFunc {
return func(d *Decoder, v reflect.Value) error {
if d.hasNilCode() {
if !v.IsNil() {
v.Set(reflect.Zero(v.Type()))
v.Set(d.newValue(typ))
}
return d.DecodeNil()
}
if v.IsNil() {
v.Set(reflect.New(v.Type().Elem()))
v.Set(d.newValue(typ.Elem()))
}
return decoder(d, v.Elem())
}
@@ -154,7 +155,7 @@ func nilAwareDecoder(typ reflect.Type, fn decoderFunc) decoderFunc {
return d.decodeNilValue(v)
}
if v.IsNil() {
v.Set(reflect.New(v.Type().Elem()))
v.Set(d.newValue(typ.Elem()))
}
return fn(d, v)
}