@@ -49,7 +49,7 @@ func TestEncodeValue(t *testing.T) {
4949 var nullptr * int
5050
5151 for _ , test := range []struct {
52- in interface {}
52+ in any
5353 want dyn2Types.AttributeValue
5454 }{
5555 // null
@@ -74,7 +74,7 @@ func TestEncodeValue(t *testing.T) {
7474 {[]int {}, & dyn2Types.AttributeValueMemberL {Value : []dyn2Types.AttributeValue {}}},
7575 {[]int {1 , 2 }, avl (avn ("1" ), avn ("2" ))},
7676 {[... ]int {1 , 2 }, avl (avn ("1" ), avn ("2" ))},
77- {[]interface {} {nil , false }, avl (nullValue , & dyn2Types.AttributeValueMemberBOOL {Value : false })},
77+ {[]any {nil , false }, avl (nullValue , & dyn2Types.AttributeValueMemberBOOL {Value : false })},
7878 // map
7979 {map [string ]int (nil ), nullValue },
8080 {map [string ]int {}, & dyn2Types.AttributeValueMemberM {Value : map [string ]dyn2Types.AttributeValue {}}},
@@ -105,7 +105,7 @@ func TestDecodeValue(t *testing.T) {
105105
106106 for _ , test := range []struct {
107107 in dyn2Types.AttributeValue
108- want interface {}
108+ want any
109109 }{
110110 // null
111111 // {nullValue, nil}, // cant reflect new, how best to test?
@@ -160,7 +160,7 @@ func TestDecodeValue(t *testing.T) {
160160func TestDecodeErrorOnUnsupported (t * testing.T ) {
161161 for _ , tc := range []struct {
162162 in dyn2Types.AttributeValue
163- out interface {}
163+ out any
164164 }{
165165 {& dyn2Types.AttributeValueMemberSS {Value : []string {"foo" , "bar" }}, []string {}},
166166 {& dyn2Types.AttributeValueMemberNS {Value : []string {"1.1" , "-2.2" , "3.3" }}, []float64 {}},
@@ -179,18 +179,18 @@ func (ct *codecTester) UnsupportedTypes() []drivertest.UnsupportedType {
179179 return []drivertest.UnsupportedType {drivertest .BinarySet }
180180}
181181
182- func (ct * codecTester ) NativeEncode (obj interface {} ) (interface {} , error ) {
182+ func (ct * codecTester ) NativeEncode (obj any ) (any , error ) {
183183 return dynattr .Marshal (obj )
184184}
185185
186- func (ct * codecTester ) NativeDecode (value , dest interface {} ) error {
186+ func (ct * codecTester ) NativeDecode (value , dest any ) error {
187187 return dynattr .Unmarshal (value .(dyn2Types.AttributeValue ), dest )
188188}
189189
190- func (ct * codecTester ) DocstoreEncode (obj interface {} ) (interface {} , error ) {
190+ func (ct * codecTester ) DocstoreEncode (obj any ) (any , error ) {
191191 return encodeDoc (drivertest .MustDocument (obj ))
192192}
193193
194- func (ct * codecTester ) DocstoreDecode (value , dest interface {} ) error {
194+ func (ct * codecTester ) DocstoreDecode (value , dest any ) error {
195195 return decodeDoc (value .(dyn2Types.AttributeValue ), drivertest .MustDocument (dest ))
196196}
0 commit comments