@@ -1065,51 +1065,51 @@ type sliceHeader struct {
10651065
10661066var (
10671067 nullType = reflect .TypeOf (nil )
1068- boolType = reflect .TypeOf ( false )
1069-
1070- intType = reflect .TypeOf ( int ( 0 ) )
1071- int8Type = reflect .TypeOf ( int8 ( 0 ) )
1072- int16Type = reflect .TypeOf ( int16 ( 0 ) )
1073- int32Type = reflect .TypeOf ( int32 ( 0 ) )
1074- int64Type = reflect .TypeOf ( int64 ( 0 ) )
1075-
1076- uintType = reflect .TypeOf ( uint ( 0 ) )
1077- uint8Type = reflect .TypeOf ( uint8 ( 0 ) )
1078- uint16Type = reflect .TypeOf ( uint16 ( 0 ) )
1079- uint32Type = reflect .TypeOf ( uint32 ( 0 ) )
1080- uint64Type = reflect .TypeOf ( uint64 ( 0 ) )
1081- uintptrType = reflect .TypeOf ( uintptr ( 0 ) )
1082-
1083- float32Type = reflect .TypeOf ( float32 ( 0 ) )
1084- float64Type = reflect .TypeOf ( float64 ( 0 ) )
1085-
1086- bigIntType = reflect .TypeOf ( new ( big.Int ) )
1087- numberType = reflect .TypeOf ( json .Number ( "" ) )
1088- stringType = reflect .TypeOf ( "" )
1089- stringsType = reflect .TypeOf ([ ]string ( nil ) )
1090- bytesType = reflect .TypeOf (([ ]byte )( nil ) )
1091- durationType = reflect .TypeOf ( time .Duration ( 0 ) )
1092- timeType = reflect .TypeOf ( time.Time {} )
1093- rawMessageType = reflect .TypeOf ( RawMessage ( nil ) )
1068+ boolType = reflect .TypeFor [ bool ]( )
1069+
1070+ intType = reflect .TypeFor [ int ]( )
1071+ int8Type = reflect .TypeFor [ int8 ]( )
1072+ int16Type = reflect .TypeFor [ int16 ]( )
1073+ int32Type = reflect .TypeFor [ int32 ]( )
1074+ int64Type = reflect .TypeFor [ int64 ]( )
1075+
1076+ uintType = reflect .TypeFor [ uint ]( )
1077+ uint8Type = reflect .TypeFor [ uint8 ]( )
1078+ uint16Type = reflect .TypeFor [ uint16 ]( )
1079+ uint32Type = reflect .TypeFor [ uint32 ]( )
1080+ uint64Type = reflect .TypeFor [ uint64 ]( )
1081+ uintptrType = reflect .TypeFor [ uintptr ]( )
1082+
1083+ float32Type = reflect .TypeFor [ float32 ]( )
1084+ float64Type = reflect .TypeFor [ float64 ]( )
1085+
1086+ bigIntType = reflect .TypeFor [ * big.Int ]( )
1087+ numberType = reflect .TypeFor [ json.Number ]( )
1088+ stringType = reflect .TypeFor [ string ]( )
1089+ stringsType = reflect .TypeFor [[ ]string ]( )
1090+ bytesType = reflect .TypeFor [[ ]byte ]( )
1091+ durationType = reflect .TypeFor [ time.Duration ]( )
1092+ timeType = reflect .TypeFor [ time.Time ]( )
1093+ rawMessageType = reflect .TypeFor [ RawMessage ]( )
10941094
10951095 numberPtrType = reflect .PointerTo (numberType )
10961096 durationPtrType = reflect .PointerTo (durationType )
10971097 timePtrType = reflect .PointerTo (timeType )
10981098 rawMessagePtrType = reflect .PointerTo (rawMessageType )
10991099
1100- sliceInterfaceType = reflect .TypeOf (([ ]any )( nil ) )
1101- sliceStringType = reflect .TypeOf (([ ]any )( nil ) )
1102- mapStringInterfaceType = reflect .TypeOf (( map [string ]any )( nil ) )
1103- mapStringRawMessageType = reflect .TypeOf (( map [string ]RawMessage )( nil ) )
1104- mapStringStringType = reflect .TypeOf (( map [string ]string )( nil ) )
1105- mapStringStringSliceType = reflect .TypeOf (( map [string ][]string )( nil ) )
1106- mapStringBoolType = reflect .TypeOf (( map [string ]bool )( nil ) )
1107-
1108- interfaceType = reflect .TypeOf (( * any )( nil )). Elem ()
1109- jsonMarshalerType = reflect .TypeOf (( * Marshaler )( nil )). Elem ()
1110- jsonUnmarshalerType = reflect .TypeOf (( * Unmarshaler )( nil )). Elem ()
1111- textMarshalerType = reflect .TypeOf (( * encoding .TextMarshaler )( nil )). Elem ()
1112- textUnmarshalerType = reflect .TypeOf (( * encoding .TextUnmarshaler )( nil )). Elem ()
1100+ sliceInterfaceType = reflect .TypeFor [[ ]any ]( )
1101+ sliceStringType = reflect .TypeFor [[ ]any ]( )
1102+ mapStringInterfaceType = reflect .TypeFor [ map [string ]any ]( )
1103+ mapStringRawMessageType = reflect .TypeFor [ map [string ]RawMessage ]( )
1104+ mapStringStringType = reflect .TypeFor [ map [string ]string ]( )
1105+ mapStringStringSliceType = reflect .TypeFor [ map [string ][]string ]( )
1106+ mapStringBoolType = reflect .TypeFor [ map [string ]bool ]( )
1107+
1108+ interfaceType = reflect .TypeFor [ any ] ()
1109+ jsonMarshalerType = reflect .TypeFor [ Marshaler ] ()
1110+ jsonUnmarshalerType = reflect .TypeFor [ Unmarshaler ] ()
1111+ textMarshalerType = reflect .TypeFor [ encoding.TextMarshaler ] ()
1112+ textUnmarshalerType = reflect .TypeFor [ encoding.TextUnmarshaler ] ()
11131113
11141114 bigIntDecoder = constructJSONUnmarshalerDecodeFunc (bigIntType , false )
11151115)
0 commit comments