From cbc3dd69c1f99ef969e78464967a1b8957dc1d1c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 15 May 2024 13:11:52 +0200 Subject: [PATCH] all: replace interface{} by any now that we are on Go 1.21 I generated this change using: % sed -i 's,interface{},any,g' **/*.go % git checkout -- **/*.pb.go % $EDITOR cmd/protoc-gen-go/internal_gengo/well_known_types.go % ./regenerate.bash Change-Id: I728f4b69c87ffc8f3b19bf807bf9bf1479bdbab4 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/585735 LUCI-TryBot-Result: Go LUCI Reviewed-by: Lasse Folger --- cmd/protoc-gen-go/internal_gengo/reflect.go | 6 +- .../internal_gengo/well_known_types.go | 40 ++++----- .../testdata/annotations/annotations.pb.go | 4 +- .../testdata/comments/comments.pb.go | 16 ++-- .../testdata/comments/deprecated.pb.go | 4 +- .../testdata/extensions/base/base.pb.go | 6 +- .../testdata/extensions/ext/ext.pb.go | 18 ++-- .../testdata/extensions/extra/extra.pb.go | 4 +- .../testdata/extensions/proto3/ext3.pb.go | 4 +- .../testdata/fieldnames/fieldnames.pb.go | 8 +- .../testdata/import_public/a.pb.go | 4 +- .../testdata/import_public/b.pb.go | 4 +- .../testdata/import_public/c.pb.go | 4 +- .../testdata/import_public/sub/a.pb.go | 10 +-- .../testdata/import_public/sub/b.pb.go | 4 +- .../testdata/import_public/sub2/a.pb.go | 4 +- .../testdata/imports/fmt/m.pb.go | 4 +- .../testdata/imports/test_a_1/m1.pb.go | 6 +- .../testdata/imports/test_a_1/m2.pb.go | 4 +- .../testdata/imports/test_a_2/m3.pb.go | 4 +- .../testdata/imports/test_a_2/m4.pb.go | 4 +- .../testdata/imports/test_b_1/m1.pb.go | 4 +- .../testdata/imports/test_b_1/m2.pb.go | 4 +- .../testdata/imports/test_import_a1m1.pb.go | 4 +- .../testdata/imports/test_import_a1m2.pb.go | 4 +- .../testdata/imports/test_import_all.pb.go | 4 +- .../issue780_oneof_conflict/test.pb.go | 6 +- .../testdata/nopackage/nopackage.pb.go | 4 +- cmd/protoc-gen-go/testdata/proto2/enum.pb.go | 6 +- .../testdata/proto2/fields.pb.go | 16 ++-- .../testdata/proto2/nested_messages.pb.go | 8 +- .../testdata/proto2/proto2.pb.go | 4 +- cmd/protoc-gen-go/testdata/proto3/enum.pb.go | 2 +- .../testdata/proto3/fields.pb.go | 6 +- .../testdata/protoeditions/enum.pb.go | 6 +- .../testdata/protoeditions/fields.pb.go | 16 ++-- .../protoeditions/nested_messages.pb.go | 8 +- .../testdata/retention/options_message.pb.go | 4 +- .../testdata/retention/retention.pb.go | 10 +-- compiler/protogen/protogen.go | 2 +- encoding/protojson/decode.go | 4 +- encoding/prototext/decode.go | 4 +- encoding/protowire/wire_test.go | 6 +- internal/cmd/generate-types/impl.go | 2 +- internal/cmd/generate-types/main.go | 2 +- internal/encoding/json/decode.go | 2 +- internal/encoding/json/decode_test.go | 4 +- internal/encoding/text/decode.go | 2 +- internal/encoding/text/decode_test.go | 6 +- internal/errors/errors.go | 6 +- internal/filedesc/desc_init.go | 2 +- internal/filedesc/desc_test.go | 8 +- internal/filetype/build.go | 4 +- internal/impl/api_export.go | 6 +- internal/impl/convert.go | 2 +- internal/impl/convert_list.go | 2 +- internal/impl/convert_map.go | 2 +- internal/impl/extension.go | 8 +- internal/impl/extension_test.go | 2 +- internal/impl/lazy_test.go | 4 +- internal/impl/legacy_aberrant_test.go | 4 +- internal/impl/legacy_enum.go | 2 +- internal/impl/legacy_file_test.go | 10 +-- internal/impl/legacy_message.go | 4 +- internal/impl/legacy_test.go | 22 ++--- internal/impl/message.go | 8 +- internal/impl/message_reflect.go | 10 +-- internal/impl/message_reflect_gen.go | 4 +- internal/impl/message_reflect_test.go | 36 ++++---- internal/impl/pointer_reflect.go | 6 +- internal/impl/pointer_unsafe.go | 4 +- internal/msgfmt/format.go | 4 +- internal/order/order_test.go | 14 ++-- internal/order/range.go | 4 +- internal/protobuild/build.go | 4 +- internal/protolegacy/proto.go | 2 +- .../testprotos/annotation/annotation.pb.go | 2 +- .../testprotos/benchmarks/micro/micro.pb.go | 4 +- .../testprotos/conformance/conformance.pb.go | 14 ++-- .../editions/test_messages_edition2023.pb.go | 14 ++-- .../test_messages_proto2_editions.pb.go | 46 +++++----- .../test_messages_proto3_editions.pb.go | 14 ++-- .../conformance/test_messages_proto2.pb.go | 46 +++++----- .../conformance/test_messages_proto3.pb.go | 14 ++-- .../testprotos/editionsfuzztest/test2.pb.go | 14 ++-- .../editionsfuzztest/test2editions.pb.go | 14 ++-- .../testprotos/editionsfuzztest/test3.pb.go | 10 +-- .../editionsfuzztest/test3editions.pb.go | 10 +-- internal/testprotos/enums/enums.pb.go | 2 +- .../testprotos/fieldtrack/fieldtrack.pb.go | 4 +- internal/testprotos/fuzz/fuzz.pb.go | 4 +- internal/testprotos/irregular/test.pb.go | 6 +- .../lazy_extension_normalized_wire_test.pb.go | 8 +- .../testprotos/lazy/lazy_extension_test.pb.go | 16 ++-- internal/testprotos/legacy/legacy.pb.go | 4 +- .../messageset/messagesetpb/message_set.pb.go | 6 +- .../messageset/msetextpb/msetextpb.pb.go | 10 +-- internal/testprotos/news/news.pb.go | 8 +- internal/testprotos/nullable/nullable.go | 8 +- internal/testprotos/order/order.pb.go | 6 +- internal/testprotos/race/extender/test.pb.go | 4 +- internal/testprotos/race/message/test.pb.go | 4 +- internal/testprotos/registry/test.pb.go | 10 +-- internal/testprotos/required/required.pb.go | 36 ++++---- internal/testprotos/test/ext.pb.go | 2 +- internal/testprotos/test/test.pb.go | 62 +++++++------- internal/testprotos/test/test_import.pb.go | 4 +- internal/testprotos/test/test_public.pb.go | 4 +- .../testprotos/test/weak1/test_weak.pb.go | 4 +- .../testprotos/test/weak2/test_weak.pb.go | 4 +- internal/testprotos/test3/test.pb.go | 10 +-- .../testprotos/test3/test_extension.pb.go | 2 +- internal/testprotos/test3/test_import.pb.go | 4 +- internal/testprotos/testeditions/test.pb.go | 32 +++---- .../testeditions/test_extension.pb.go | 14 ++-- .../testeditions/test_extension2.pb.go | 4 +- internal/testprotos/textpb2/test.pb.go | 44 +++++----- internal/testprotos/textpb3/test.pb.go | 24 +++--- .../testprotos/textpbeditions/test2.pb.go | 50 +++++------ proto/decode_test.go | 2 +- proto/extension.go | 6 +- proto/extension_test.go | 18 ++-- proto/nil_test.go | 2 +- proto/noenforceutf8_test.go | 2 +- reflect/protorange/range_test.go | 4 +- reflect/protoreflect/type.go | 6 +- reflect/protoreflect/value_pure.go | 14 ++-- reflect/protoreflect/value_test.go | 4 +- reflect/protoreflect/value_union.go | 14 ++-- reflect/protoreflect/value_unsafe_go120.go | 6 +- reflect/protoreflect/value_unsafe_go121.go | 8 +- reflect/protoregistry/registry.go | 14 ++-- testing/protocmp/reflect.go | 2 +- testing/protocmp/util.go | 14 ++-- testing/protocmp/util_test.go | 76 ++++++++--------- testing/protocmp/xform.go | 10 +-- testing/prototest/message.go | 2 +- types/descriptorpb/descriptor.pb.go | 68 +++++++-------- types/dynamicpb/dynamic.go | 16 ++-- types/gofeaturespb/go_features.pb.go | 4 +- types/known/anypb/any.pb.go | 4 +- types/known/apipb/api.pb.go | 8 +- types/known/durationpb/duration.pb.go | 4 +- types/known/emptypb/empty.pb.go | 4 +- types/known/fieldmaskpb/field_mask.pb.go | 4 +- .../sourcecontextpb/source_context.pb.go | 4 +- types/known/structpb/struct.pb.go | 50 +++++------ types/known/structpb/struct_test.go | 84 +++++++++---------- types/known/timestamppb/timestamp.pb.go | 4 +- types/known/typepb/type.pb.go | 12 +-- types/known/wrapperspb/wrappers.pb.go | 20 ++--- types/pluginpb/plugin.pb.go | 10 +-- 152 files changed, 799 insertions(+), 799 deletions(-) diff --git a/cmd/protoc-gen-go/internal_gengo/reflect.go b/cmd/protoc-gen-go/internal_gengo/reflect.go index 0048beb1e..4e9c9aea7 100644 --- a/cmd/protoc-gen-go/internal_gengo/reflect.go +++ b/cmd/protoc-gen-go/internal_gengo/reflect.go @@ -132,7 +132,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f panic("too many dependencies") // sanity check } - g.P("var ", goTypesVarName(f), " = []interface{}{") + g.P("var ", goTypesVarName(f), " = []any{") for _, s := range goTypes { g.P(s) } @@ -170,7 +170,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f idx := f.allMessagesByPtr[message] typesVar := messageTypesVarName(f) - g.P(typesVar, "[", idx, "].Exporter = func(v interface{}, i int) interface{} {") + g.P(typesVar, "[", idx, "].Exporter = func(v any, i int) any {") g.P("switch v := v.(*", message.GoIdent, "); i {") for i := 0; i < sf.count; i++ { if name := sf.unexported[i]; name != "" { @@ -191,7 +191,7 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f typesVar := messageTypesVarName(f) // Associate the wrapper types by directly passing them to the MessageInfo. - g.P(typesVar, "[", idx, "].OneofWrappers = []interface{} {") + g.P(typesVar, "[", idx, "].OneofWrappers = []any {") for _, oneof := range message.Oneofs { if !oneof.Desc.IsSynthetic() { for _, field := range oneof.Fields { diff --git a/cmd/protoc-gen-go/internal_gengo/well_known_types.go b/cmd/protoc-gen-go/internal_gengo/well_known_types.go index 47c4fa18f..9a7b59030 100644 --- a/cmd/protoc-gen-go/internal_gengo/well_known_types.go +++ b/cmd/protoc-gen-go/internal_gengo/well_known_types.go @@ -213,11 +213,11 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments { The standard Go "encoding/json" package has functionality to serialize arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and ListValue.AsSlice methods can convert the protobuf message representation into - a form represented by interface{}, map[string]interface{}, and []interface{}. + a form represented by any, map[string]any, and []any. This form can be used with other packages that operate on such data structures and also directly with the standard json package. - In order to convert the interface{}, map[string]interface{}, and []interface{} + In order to convert the any, map[string]any, and []any forms back as Value, Struct, and ListValue messages, use the NewStruct, NewList, and NewValue constructor functions. @@ -252,28 +252,28 @@ func genPackageKnownComment(f *fileInfo) protogen.Comments { To construct a Value message representing the above JSON object: - m, err := structpb.NewValue(map[string]interface{}{ + m, err := structpb.NewValue(map[string]any{ "firstName": "John", "lastName": "Smith", "isAlive": true, "age": 27, - "address": map[string]interface{}{ + "address": map[string]any{ "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100", }, - "phoneNumbers": []interface{}{ - map[string]interface{}{ + "phoneNumbers": []any{ + map[string]any{ "type": "home", "number": "212 555-1234", }, - map[string]interface{}{ + map[string]any{ "type": "office", "number": "646 555-4567", }, }, - "children": []interface{}{}, + "children": []any{}, "spouse": nil, }) if err != nil { @@ -634,7 +634,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// NewStruct constructs a Struct from a general-purpose Go map.") g.P("// The map keys must be valid UTF-8.") g.P("// The map values are converted using NewValue.") - g.P("func NewStruct(v map[string]interface{}) (*Struct, error) {") + g.P("func NewStruct(v map[string]any) (*Struct, error) {") g.P(" x := &Struct{Fields: make(map[string]*Value, len(v))}") g.P(" for k, v := range v {") g.P(" if !", utf8Package.Ident("ValidString"), "(k) {") @@ -652,9 +652,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// AsMap converts x to a general-purpose Go map.") g.P("// The map values are converted by calling Value.AsInterface.") - g.P("func (x *Struct) AsMap() map[string]interface{} {") + g.P("func (x *Struct) AsMap() map[string]any {") g.P(" f := x.GetFields()") - g.P(" vs := make(map[string]interface{}, len(f))") + g.P(" vs := make(map[string]any, len(f))") g.P(" for k, v := range f {") g.P(" vs[k] = v.AsInterface()") g.P(" }") @@ -675,7 +675,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message case genid.ListValue_message_fullname: g.P("// NewList constructs a ListValue from a general-purpose Go slice.") g.P("// The slice elements are converted using NewValue.") - g.P("func NewList(v []interface{}) (*ListValue, error) {") + g.P("func NewList(v []any) (*ListValue, error) {") g.P(" x := &ListValue{Values: make([]*Value, len(v))}") g.P(" for i, v := range v {") g.P(" var err error") @@ -690,9 +690,9 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// AsSlice converts x to a general-purpose Go slice.") g.P("// The slice elements are converted by calling Value.AsInterface.") - g.P("func (x *ListValue) AsSlice() []interface{} {") + g.P("func (x *ListValue) AsSlice() []any {") g.P(" vals := x.GetValues()") - g.P(" vs := make([]interface{}, len(vals))") + g.P(" vs := make([]any, len(vals))") g.P(" for i, v := range vals {") g.P(" vs[i] = v.AsInterface()") g.P(" }") @@ -723,13 +723,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("// ║ float32, float64 │ stored as NumberValue ║") g.P("// ║ string │ stored as StringValue; must be valid UTF-8 ║") g.P("// ║ []byte │ stored as StringValue; base64-encoded ║") - g.P("// ║ map[string]interface{} │ stored as StructValue ║") - g.P("// ║ []interface{} │ stored as ListValue ║") + g.P("// ║ map[string]any │ stored as StructValue ║") + g.P("// ║ []any │ stored as ListValue ║") g.P("// ╚════════════════════════╧════════════════════════════════════════════╝") g.P("//") g.P("// When converting an int64 or uint64 to a NumberValue, numeric precision loss") g.P("// is possible since they are stored as a float64.") - g.P("func NewValue(v interface{}) (*Value, error) {") + g.P("func NewValue(v any) (*Value, error) {") g.P(" switch v := v.(type) {") g.P(" case nil:") g.P(" return NewNullValue(), nil") @@ -759,13 +759,13 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P(" case []byte:") g.P(" s := ", base64Package.Ident("StdEncoding"), ".EncodeToString(v)") g.P(" return NewStringValue(s), nil") - g.P(" case map[string]interface{}:") + g.P(" case map[string]any:") g.P(" v2, err := NewStruct(v)") g.P(" if err != nil {") g.P(" return nil, err") g.P(" }") g.P(" return NewStructValue(v2), nil") - g.P(" case []interface{}:") + g.P(" case []any:") g.P(" v2, err := NewList(v)") g.P(" if err != nil {") g.P(" return nil, err") @@ -820,7 +820,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message g.P("//") g.P("// Floating-point values (i.e., \"NaN\", \"Infinity\", and \"-Infinity\") are") g.P("// converted as strings to remain compatible with MarshalJSON.") - g.P("func (x *Value) AsInterface() interface{} {") + g.P("func (x *Value) AsInterface() any {") g.P(" switch v := x.GetKind().(type) {") g.P(" case *Value_NumberValue:") g.P(" if v != nil {") diff --git a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go index 91caa37b5..1db210a10 100644 --- a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go +++ b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go @@ -175,7 +175,7 @@ func file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_rawDescGZIP() var file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_goTypes = []any{ (AnnotationsTestEnum)(0), // 0: goproto.protoc.annotations.AnnotationsTestEnum (*AnnotationsTestMessage)(nil), // 1: goproto.protoc.annotations.AnnotationsTestMessage } @@ -193,7 +193,7 @@ func file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*AnnotationsTestMessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/comments/comments.pb.go b/cmd/protoc-gen-go/testdata/comments/comments.pb.go index e0e34e4c4..11c4461d6 100644 --- a/cmd/protoc-gen-go/testdata/comments/comments.pb.go +++ b/cmd/protoc-gen-go/testdata/comments/comments.pb.go @@ -417,7 +417,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_rawDescGZIP() []byt var file_cmd_protoc_gen_go_testdata_comments_comments_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_cmd_protoc_gen_go_testdata_comments_comments_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_comments_comments_proto_goTypes = []any{ (Enum1)(0), // 0: goproto.protoc.comments.Enum1 (*Message1)(nil), // 1: goproto.protoc.comments.Message1 (*Message2)(nil), // 2: goproto.protoc.comments.Message2 @@ -442,7 +442,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message1); i { case 0: return &v.state @@ -456,7 +456,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Message2); i { case 0: return &v.state @@ -468,7 +468,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Message1_Message1A); i { case 0: return &v.state @@ -480,7 +480,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Message1_Message1B); i { case 0: return &v.state @@ -492,7 +492,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Message2_Message2A); i { case 0: return &v.state @@ -504,7 +504,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Message2_Message2B); i { case 0: return &v.state @@ -517,7 +517,7 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[0].OneofWrappers = []any{ (*Message1_Oneof1AField1)(nil), } type x struct{} diff --git a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go index 906a42194..9a8c86854 100644 --- a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go +++ b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go @@ -145,7 +145,7 @@ func file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_rawDescGZIP() []b var file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_goTypes = []any{ (DeprecatedEnum)(0), // 0: goproto.protoc.comments.DeprecatedEnum (*DeprecatedMessage)(nil), // 1: goproto.protoc.comments.DeprecatedMessage } @@ -163,7 +163,7 @@ func file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DeprecatedMessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go index 4e412ab2a..30a799303 100644 --- a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go +++ b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go @@ -136,7 +136,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_rawDescGZIP() [] } var file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_goTypes = []any{ (*BaseMessage)(nil), // 0: goproto.protoc.extension.base.BaseMessage (*MessageSetWireFormatMessage)(nil), // 1: goproto.protoc.extension.base.MessageSetWireFormatMessage } @@ -154,7 +154,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*BaseMessage); i { case 0: return &v.state @@ -168,7 +168,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*MessageSetWireFormatMessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go index c712715f4..14eace61c 100644 --- a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go +++ b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go @@ -1196,7 +1196,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_rawDescGZIP() []by var file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_goTypes = []any{ (Enum)(0), // 0: goproto.protoc.extension.ext.Enum (*Message)(nil), // 1: goproto.protoc.extension.ext.Message (*ExtensionGroup)(nil), // 2: goproto.protoc.extension.ext.ExtensionGroup @@ -1280,7 +1280,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -1292,7 +1292,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ExtensionGroup); i { case 0: return &v.state @@ -1304,7 +1304,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ExtendingMessage); i { case 0: return &v.state @@ -1316,7 +1316,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*RepeatedGroup); i { case 0: return &v.state @@ -1328,7 +1328,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Extendable); i { case 0: return &v.state @@ -1342,7 +1342,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*MessageSetWireFormatExtension); i { case 0: return &v.state @@ -1354,7 +1354,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Message_M); i { case 0: return &v.state @@ -1366,7 +1366,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ExtendingMessage_ExtendingMessageSubmessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go index c056c4b40..71441c6ba 100644 --- a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go +++ b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go @@ -92,7 +92,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_rawDescGZIP() } var file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_goTypes = []any{ (*ExtraMessage)(nil), // 0: goproto.protoc.extension.extra.ExtraMessage } var file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_depIdxs = []int32{ @@ -109,7 +109,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ExtraMessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go b/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go index 9f870abb6..e404679f0 100644 --- a/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go +++ b/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go @@ -669,7 +669,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_rawDescGZIP() var file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_goTypes = []any{ (Enum)(0), // 0: goproto.protoc.extension.proto3.Enum (*Message)(nil), // 1: goproto.protoc.extension.proto3.Message (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions @@ -726,7 +726,7 @@ func file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go index be5326567..2b063e1f3 100644 --- a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go +++ b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go @@ -388,7 +388,7 @@ func file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_rawDescGZIP() [ } var file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_goTypes = []any{ (*Message)(nil), // 0: goproto.protoc.fieldnames.Message (*Message_OneofMessageConflict)(nil), // 1: goproto.protoc.fieldnames.Message.OneofMessageConflict } @@ -406,7 +406,7 @@ func file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -418,7 +418,7 @@ func file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Message_OneofMessageConflict); i { case 0: return &v.state @@ -431,7 +431,7 @@ func file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[0].OneofWrappers = []any{ (*Message_OneofConflictA)(nil), (*Message_OneofNoConflict)(nil), (*Message_OneofConflictB_)(nil), diff --git a/cmd/protoc-gen-go/testdata/import_public/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/a.pb.go index 9a162e6b2..7153fe2f0 100644 --- a/cmd/protoc-gen-go/testdata/import_public/a.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/a.pb.go @@ -161,7 +161,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_a_proto_rawDescGZIP() []byte } var file_cmd_protoc_gen_go_testdata_import_public_a_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_import_public_a_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_a_proto_goTypes = []any{ (*Public)(nil), // 0: goproto.protoc.import_public.Public (*sub.M)(nil), // 1: goproto.protoc.import_public.sub.M (sub.E)(0), // 2: goproto.protoc.import_public.sub.E @@ -185,7 +185,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_a_proto_init() { } file_cmd_protoc_gen_go_testdata_import_public_b_proto_init() if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_a_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Public); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/import_public/b.pb.go b/cmd/protoc-gen-go/testdata/import_public/b.pb.go index 68541571b..b88b335e3 100644 --- a/cmd/protoc-gen-go/testdata/import_public/b.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/b.pb.go @@ -108,7 +108,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_b_proto_rawDescGZIP() []byte } var file_cmd_protoc_gen_go_testdata_import_public_b_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_import_public_b_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_b_proto_goTypes = []any{ (*Local)(nil), // 0: goproto.protoc.import_public.Local (*sub.M)(nil), // 1: goproto.protoc.import_public.sub.M (sub.E)(0), // 2: goproto.protoc.import_public.sub.E @@ -129,7 +129,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_b_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_b_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_b_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Local); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/import_public/c.pb.go b/cmd/protoc-gen-go/testdata/import_public/c.pb.go index ee2dbeabe..bef79607e 100644 --- a/cmd/protoc-gen-go/testdata/import_public/c.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/c.pb.go @@ -113,7 +113,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_c_proto_rawDescGZIP() []byte } var file_cmd_protoc_gen_go_testdata_import_public_c_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_import_public_c_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_c_proto_goTypes = []any{ (*UsingPublicImport)(nil), // 0: goproto.protoc.import_public.UsingPublicImport (*Local)(nil), // 1: goproto.protoc.import_public.Local (*sub2.Sub2Message)(nil), // 2: goproto.protoc.import_public.sub2.Sub2Message @@ -135,7 +135,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_c_proto_init() { } file_cmd_protoc_gen_go_testdata_import_public_a_proto_init() if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_c_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_c_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*UsingPublicImport); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go index 23bdda3e7..c347ddb56 100644 --- a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go @@ -473,7 +473,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_rawDescGZIP() []b var file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_goTypes = []any{ (E)(0), // 0: goproto.protoc.import_public.sub.E (M_Subenum)(0), // 1: goproto.protoc.import_public.sub.M.Subenum (M_Submessage_Submessage_Subenum)(0), // 2: goproto.protoc.import_public.sub.M.Submessage.Submessage_Subenum @@ -498,7 +498,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_init() { } file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_init() if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M); i { case 0: return &v.state @@ -512,7 +512,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*M_Submessage); i { case 0: return &v.state @@ -525,11 +525,11 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[0].OneofWrappers = []any{ (*M_OneofInt32)(nil), (*M_OneofInt64)(nil), } - file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[1].OneofWrappers = []any{ (*M_Submessage_SubmessageOneofInt32)(nil), (*M_Submessage_SubmessageOneofInt64)(nil), } diff --git a/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go index 5679e9596..60e73a4f5 100644 --- a/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go @@ -81,7 +81,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_goTypes = []any{ (*M2)(nil), // 0: goproto.protoc.import_public.sub.M2 } var file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_depIdxs = []int32{ @@ -98,7 +98,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go index 98499fd34..fef44e5cb 100644 --- a/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go +++ b/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go @@ -82,7 +82,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_rawDescGZIP() [] } var file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_goTypes = []any{ (*Sub2Message)(nil), // 0: goproto.protoc.import_public.sub2.Sub2Message } var file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_depIdxs = []int32{ @@ -99,7 +99,7 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Sub2Message); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go b/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go index 7d8914678..32445346a 100644 --- a/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go @@ -79,7 +79,7 @@ func file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_rawDescGZIP() []byte { } var file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_goTypes = []any{ (*M)(nil), // 0: fmt.M } var file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_depIdxs = []int32{ @@ -96,7 +96,7 @@ func file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go index 363f0b7bb..2c07d658a 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go @@ -174,7 +174,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_rawDescGZIP() []b var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_goTypes = []any{ (E1)(0), // 0: test.a.E1 (*M1)(nil), // 1: test.a.M1 (*M1_1)(nil), // 2: test.a.M1_1 @@ -194,7 +194,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M1); i { case 0: return &v.state @@ -206,7 +206,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*M1_1); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go index 978732146..3f6ce9229 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go @@ -80,7 +80,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_goTypes = []any{ (*M2)(nil), // 0: test.a.M2 } var file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_depIdxs = []int32{ @@ -97,7 +97,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go index 3eabde129..22b8cfa9d 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go @@ -80,7 +80,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_goTypes = []any{ (*M3)(nil), // 0: test.a.M3 } var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_depIdxs = []int32{ @@ -97,7 +97,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M3); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go index be5ec6cf7..ea8144159 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go @@ -80,7 +80,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_goTypes = []any{ (*M4)(nil), // 0: test.a.M4 } var file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_depIdxs = []int32{ @@ -97,7 +97,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M4); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go index 238ee727b..30dc8c25c 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go @@ -81,7 +81,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_goTypes = []any{ (*M1)(nil), // 0: test.b.part1.M1 } var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_depIdxs = []int32{ @@ -98,7 +98,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M1); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go index 72880135e..16b6a1c5e 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go @@ -81,7 +81,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_rawDescGZIP() []b } var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_goTypes = []any{ (*M2)(nil), // 0: test.b.part2.M2 } var file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_depIdxs = []int32{ @@ -98,7 +98,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*M2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go index 155c28505..94f4aeefb 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go @@ -95,7 +95,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_rawDescGZIP( } var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_goTypes = []any{ (*A1M1)(nil), // 0: test.A1M1 (*test_a_1.M1)(nil), // 1: test.a.M1 } @@ -114,7 +114,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*A1M1); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go index bbb0cfbaa..6a5dfa3cb 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go @@ -95,7 +95,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_rawDescGZIP( } var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_goTypes = []any{ (*A1M2)(nil), // 0: test.A1M2 (*test_a_1.M2)(nil), // 1: test.a.M2 } @@ -114,7 +114,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*A1M2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go index 7e499a30e..235d2dff3 100644 --- a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go +++ b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go @@ -158,7 +158,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_rawDescGZIP() } var file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_goTypes = []any{ (*All)(nil), // 0: test.All (*test_a_1.M1)(nil), // 1: test.a.M1 (*test_a_1.M2)(nil), // 2: test.a.M2 @@ -185,7 +185,7 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*All); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go b/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go index 40c0ada06..5d5310ce7 100644 --- a/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go +++ b/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go @@ -112,7 +112,7 @@ func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_rawDescG } var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_goTypes = []any{ (*Foo)(nil), // 0: oneoftest.Foo } var file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_depIdxs = []int32{ @@ -129,7 +129,7 @@ func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Foo); i { case 0: return &v.state @@ -142,7 +142,7 @@ func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []any{ (*Foo_GetBar)(nil), } type x struct{} diff --git a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go index a81e00194..65053d44f 100644 --- a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go +++ b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go @@ -157,7 +157,7 @@ func file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_rawDescGZIP() []b var file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_goTypes = []any{ (Enum)(0), // 0: Enum (*Message)(nil), // 1: Message } @@ -176,7 +176,7 @@ func file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go index c031b3938..82de1ed12 100644 --- a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go +++ b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go @@ -504,7 +504,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_enum_proto_rawDescGZIP() []byte { var file_cmd_protoc_gen_go_testdata_proto2_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_cmd_protoc_gen_go_testdata_proto2_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_proto2_enum_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto2_enum_proto_goTypes = []any{ (EnumType1)(0), // 0: goproto.protoc.proto2.EnumType1 (EnumType2)(0), // 1: goproto.protoc.proto2.EnumType2 (EnumContainerMessage1_NestedEnumType1A)(0), // 2: goproto.protoc.proto2.EnumContainerMessage1.NestedEnumType1A @@ -530,7 +530,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_enum_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_proto2_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_enum_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*EnumContainerMessage1); i { case 0: return &v.state @@ -542,7 +542,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_enum_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_enum_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_enum_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*EnumContainerMessage1_EnumContainerMessage2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go index ee9546a43..9cd0c687e 100644 --- a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go +++ b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go @@ -1729,7 +1729,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_rawDescGZIP() []byte { var file_cmd_protoc_gen_go_testdata_proto2_fields_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_cmd_protoc_gen_go_testdata_proto2_fields_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto2_fields_proto_goTypes = []any{ (FieldTestMessage_Enum)(0), // 0: goproto.protoc.proto2.FieldTestMessage.Enum (*FieldTestMessage)(nil), // 1: goproto.protoc.proto2.FieldTestMessage (*FieldTestMessage_OptionalGroup)(nil), // 2: goproto.protoc.proto2.FieldTestMessage.OptionalGroup @@ -1773,7 +1773,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage); i { case 0: return &v.state @@ -1785,7 +1785,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_OptionalGroup); i { case 0: return &v.state @@ -1797,7 +1797,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_RequiredGroup); i { case 0: return &v.state @@ -1809,7 +1809,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_RepeatedGroup); i { case 0: return &v.state @@ -1821,7 +1821,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_OneofGroup); i { case 0: return &v.state @@ -1833,7 +1833,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_Message); i { case 0: return &v.state @@ -1846,7 +1846,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[0].OneofWrappers = []any{ (*FieldTestMessage_OneofBool)(nil), (*FieldTestMessage_OneofEnum)(nil), (*FieldTestMessage_OneofInt32)(nil), diff --git a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go index 9e7137a27..7e9758221 100644 --- a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go +++ b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go @@ -194,7 +194,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_rawDescGZIP() } var file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_goTypes = []any{ (*Layer1)(nil), // 0: goproto.protoc.proto2.Layer1 (*Layer1_Layer2)(nil), // 1: goproto.protoc.proto2.Layer1.Layer2 (*Layer1_Layer2_Layer3)(nil), // 2: goproto.protoc.proto2.Layer1.Layer2.Layer3 @@ -216,7 +216,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Layer1); i { case 0: return &v.state @@ -228,7 +228,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Layer1_Layer2); i { case 0: return &v.state @@ -240,7 +240,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Layer1_Layer2_Layer3); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go index 5a4f97d2a..78e935ca6 100644 --- a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go +++ b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go @@ -101,7 +101,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescGZIP() []byte { } var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_goTypes = []any{ (*Message)(nil), // 0: goproto.protoc.proto2.Message } var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_depIdxs = []int32{ @@ -119,7 +119,7 @@ func file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/proto3/enum.pb.go b/cmd/protoc-gen-go/testdata/proto3/enum.pb.go index 2ff0fee56..b524f46b5 100644 --- a/cmd/protoc-gen-go/testdata/proto3/enum.pb.go +++ b/cmd/protoc-gen-go/testdata/proto3/enum.pb.go @@ -93,7 +93,7 @@ func file_cmd_protoc_gen_go_testdata_proto3_enum_proto_rawDescGZIP() []byte { } var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_goTypes = []any{ (Enum)(0), // 0: goproto.protoc.proto3.Enum } var file_cmd_protoc_gen_go_testdata_proto3_enum_proto_depIdxs = []int32{ diff --git a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go index cba44b613..08100f87f 100644 --- a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go +++ b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go @@ -600,7 +600,7 @@ func file_cmd_protoc_gen_go_testdata_proto3_fields_proto_rawDescGZIP() []byte { var file_cmd_protoc_gen_go_testdata_proto3_fields_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_proto3_fields_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_cmd_protoc_gen_go_testdata_proto3_fields_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_proto3_fields_proto_goTypes = []any{ (FieldTestMessage_Enum)(0), // 0: goproto.protoc.proto3.FieldTestMessage.Enum (*FieldTestMessage)(nil), // 1: goproto.protoc.proto3.FieldTestMessage nil, // 2: goproto.protoc.proto3.FieldTestMessage.MapInt32Int64Entry @@ -631,7 +631,7 @@ func file_cmd_protoc_gen_go_testdata_proto3_fields_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_proto3_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto3_fields_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage); i { case 0: return &v.state @@ -643,7 +643,7 @@ func file_cmd_protoc_gen_go_testdata_proto3_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_proto3_fields_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_proto3_fields_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_Message); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/protoeditions/enum.pb.go b/cmd/protoc-gen-go/testdata/protoeditions/enum.pb.go index 83cc308f7..da3875dd1 100644 --- a/cmd/protoc-gen-go/testdata/protoeditions/enum.pb.go +++ b/cmd/protoc-gen-go/testdata/protoeditions/enum.pb.go @@ -513,7 +513,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_rawDescGZIP() []by var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_enumTypes = make([]protoimpl.EnumInfo, 7) var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_goTypes = []any{ (EnumType1)(0), // 0: goproto.protoc.protoeditions.EnumType1 (EnumType2)(0), // 1: goproto.protoc.protoeditions.EnumType2 (LegacyUnmarshalJSONTest)(0), // 2: goproto.protoc.protoeditions.LegacyUnmarshalJSONTest @@ -540,7 +540,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*EnumContainerMessage1); i { case 0: return &v.state @@ -552,7 +552,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*EnumContainerMessage1_EnumContainerMessage2); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/protoeditions/fields.pb.go b/cmd/protoc-gen-go/testdata/protoeditions/fields.pb.go index d73a8584b..e3c9ec0a7 100644 --- a/cmd/protoc-gen-go/testdata/protoeditions/fields.pb.go +++ b/cmd/protoc-gen-go/testdata/protoeditions/fields.pb.go @@ -1738,7 +1738,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_rawDescGZIP() [] var file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_goTypes = []any{ (FieldTestMessage_Enum)(0), // 0: goproto.protoc.protoeditions.FieldTestMessage.Enum (*FieldTestMessage)(nil), // 1: goproto.protoc.protoeditions.FieldTestMessage (*FieldTestMessage_OptionalGroup)(nil), // 2: goproto.protoc.protoeditions.FieldTestMessage.OptionalGroup @@ -1782,7 +1782,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage); i { case 0: return &v.state @@ -1794,7 +1794,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_OptionalGroup); i { case 0: return &v.state @@ -1806,7 +1806,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_RequiredGroup); i { case 0: return &v.state @@ -1818,7 +1818,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_RepeatedGroup); i { case 0: return &v.state @@ -1830,7 +1830,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_OneofGroup); i { case 0: return &v.state @@ -1842,7 +1842,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*FieldTestMessage_Message); i { case 0: return &v.state @@ -1855,7 +1855,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[0].OneofWrappers = []any{ (*FieldTestMessage_OneofBool)(nil), (*FieldTestMessage_OneofEnum)(nil), (*FieldTestMessage_OneofInt32)(nil), diff --git a/cmd/protoc-gen-go/testdata/protoeditions/nested_messages.pb.go b/cmd/protoc-gen-go/testdata/protoeditions/nested_messages.pb.go index 86340d340..148e15876 100644 --- a/cmd/protoc-gen-go/testdata/protoeditions/nested_messages.pb.go +++ b/cmd/protoc-gen-go/testdata/protoeditions/nested_messages.pb.go @@ -198,7 +198,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_rawDesc } var file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_goTypes = []any{ (*Layer1)(nil), // 0: goproto.protoc.protoeditions.Layer1 (*Layer1_Layer2)(nil), // 1: goproto.protoc.protoeditions.Layer1.Layer2 (*Layer1_Layer2_Layer3)(nil), // 2: goproto.protoc.protoeditions.Layer1.Layer2.Layer3 @@ -220,7 +220,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_init() return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Layer1); i { case 0: return &v.state @@ -232,7 +232,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_init() return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Layer1_Layer2); i { case 0: return &v.state @@ -244,7 +244,7 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_init() return nil } } - file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Layer1_Layer2_Layer3); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/retention/options_message.pb.go b/cmd/protoc-gen-go/testdata/retention/options_message.pb.go index 5b132bf97..5b25c42dd 100755 --- a/cmd/protoc-gen-go/testdata/retention/options_message.pb.go +++ b/cmd/protoc-gen-go/testdata/retention/options_message.pb.go @@ -192,7 +192,7 @@ func file_cmd_protoc_gen_go_testdata_retention_options_message_proto_rawDescGZIP } var file_cmd_protoc_gen_go_testdata_retention_options_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cmd_protoc_gen_go_testdata_retention_options_message_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_retention_options_message_proto_goTypes = []any{ (*OptionsMessage)(nil), // 0: testretention.OptionsMessage (*descriptorpb.FileOptions)(nil), // 1: google.protobuf.FileOptions } @@ -215,7 +215,7 @@ func file_cmd_protoc_gen_go_testdata_retention_options_message_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_retention_options_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_retention_options_message_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*OptionsMessage); i { case 0: return &v.state diff --git a/cmd/protoc-gen-go/testdata/retention/retention.pb.go b/cmd/protoc-gen-go/testdata/retention/retention.pb.go index f9624b783..2b9ea0403 100755 --- a/cmd/protoc-gen-go/testdata/retention/retention.pb.go +++ b/cmd/protoc-gen-go/testdata/retention/retention.pb.go @@ -601,7 +601,7 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_rawDescGZIP() []b var file_cmd_protoc_gen_go_testdata_retention_retention_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_cmd_protoc_gen_go_testdata_retention_retention_proto_goTypes = []interface{}{ +var file_cmd_protoc_gen_go_testdata_retention_retention_proto_goTypes = []any{ (TopLevelEnum)(0), // 0: testretention.TopLevelEnum (TopLevelMessage_NestedEnum)(0), // 1: testretention.TopLevelMessage.NestedEnum (*Extendee)(nil), // 2: testretention.Extendee @@ -658,7 +658,7 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_init() { } file_cmd_protoc_gen_go_testdata_retention_options_message_proto_init() if !protoimpl.UnsafeEnabled { - file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Extendee); i { case 0: return &v.state @@ -672,7 +672,7 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TopLevelMessage); i { case 0: return &v.state @@ -686,7 +686,7 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_init() { return nil } } - file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TopLevelMessage_NestedMessage); i { case 0: return &v.state @@ -699,7 +699,7 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_init() { } } } - file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[1].OneofWrappers = []any{ (*TopLevelMessage_I)(nil), } type x struct{} diff --git a/compiler/protogen/protogen.go b/compiler/protogen/protogen.go index b631914dc..1024a84e7 100644 --- a/compiler/protogen/protogen.go +++ b/compiler/protogen/protogen.go @@ -955,7 +955,7 @@ func (gen *Plugin) NewGeneratedFile(filename string, goImportPath GoImportPath) // P prints a line to the generated output. It converts each parameter to a // string following the same rules as [fmt.Print]. It never inserts spaces // between parameters. -func (g *GeneratedFile) P(v ...interface{}) { +func (g *GeneratedFile) P(v ...any) { for _, x := range v { switch x := x.(type) { case GoIdent: diff --git a/encoding/protojson/decode.go b/encoding/protojson/decode.go index f47902371..bb2966e3b 100644 --- a/encoding/protojson/decode.go +++ b/encoding/protojson/decode.go @@ -102,7 +102,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/encoding/prototext/decode.go b/encoding/prototext/decode.go index a45f112bc..24bc98ac4 100644 --- a/encoding/prototext/decode.go +++ b/encoding/prototext/decode.go @@ -84,7 +84,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/encoding/protowire/wire_test.go b/encoding/protowire/wire_test.go index 10ec7f805..486d183ef 100644 --- a/encoding/protowire/wire_test.go +++ b/encoding/protowire/wire_test.go @@ -29,7 +29,7 @@ type ( } // appendOp represents an Append operation. - appendOp = interface{} + appendOp = any appendTag struct { inNum Number inType Type @@ -53,7 +53,7 @@ type ( appendRaw []byte // consumeOp represents an Consume operation. - consumeOp = interface{} + consumeOp = any consumeField struct { wantNum Number wantType Type @@ -99,7 +99,7 @@ type ( wantErr error } - ops []interface{} + ops []any ) // dhex decodes a hex-string and returns the bytes and panics if s is invalid. diff --git a/internal/cmd/generate-types/impl.go b/internal/cmd/generate-types/impl.go index 13d510d1f..97bd25197 100644 --- a/internal/cmd/generate-types/impl.go +++ b/internal/cmd/generate-types/impl.go @@ -740,7 +740,7 @@ func (m *{{.}}) Interface() protoreflect.ProtoMessage { return (*messageIfaceWrapper)(m) {{- end -}} } -func (m *{{.}}) protoUnwrap() interface{} { +func (m *{{.}}) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *{{.}}) ProtoMethods() *protoiface.Methods { diff --git a/internal/cmd/generate-types/main.go b/internal/cmd/generate-types/main.go index 76e3b8946..de829f2fa 100644 --- a/internal/cmd/generate-types/main.go +++ b/internal/cmd/generate-types/main.go @@ -195,7 +195,7 @@ var descListTypesTemplate = template.Must(template.New("").Parse(` {{- end}} `)) -func mustExecute(t *template.Template, data interface{}) string { +func mustExecute(t *template.Template, data any) string { var b bytes.Buffer if err := t.Execute(&b, data); err != nil { panic(err) diff --git a/internal/encoding/json/decode.go b/internal/encoding/json/decode.go index d2b3ac031..ea1d3e65a 100644 --- a/internal/encoding/json/decode.go +++ b/internal/encoding/json/decode.go @@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) { // newSyntaxError returns an error with line and column information useful for // syntax errors. -func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(pos) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/internal/encoding/json/decode_test.go b/internal/encoding/json/decode_test.go index 31c77b05b..64ffd3764 100644 --- a/internal/encoding/json/decode_test.go +++ b/internal/encoding/json/decode_test.go @@ -1385,9 +1385,9 @@ func checkToken(t *testing.T, tok json.Token, idx int, r R, in string) { return } -func errorf(t *testing.T, in string, fmtStr string, args ...interface{}) { +func errorf(t *testing.T, in string, fmtStr string, args ...any) { t.Helper() - vargs := []interface{}{in} + vargs := []any{in} for _, arg := range args { vargs = append(vargs, arg) } diff --git a/internal/encoding/text/decode.go b/internal/encoding/text/decode.go index 87853e786..099b2bf45 100644 --- a/internal/encoding/text/decode.go +++ b/internal/encoding/text/decode.go @@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { // newSyntaxError returns a syntax error with line and column information for // current position. -func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(len(d.orig) - len(d.in)) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/internal/encoding/text/decode_test.go b/internal/encoding/text/decode_test.go index 7c705ab51..826c66c68 100644 --- a/internal/encoding/text/decode_test.go +++ b/internal/encoding/text/decode_test.go @@ -25,7 +25,7 @@ type R struct { // E is expected error substring from calling Decoder.Read if set. E string // T contains NT (if K is Name) or ST (if K is Scalar) or nil (others) - T interface{} + T any // P is expected Token.Pos if set > 0. P int // RS is expected result from Token.RawString() if not empty. @@ -1706,9 +1706,9 @@ func checkToken(t *testing.T, tok text.Token, idx int, r R, in string) { } } -func errorf(t *testing.T, in string, fmtStr string, args ...interface{}) { +func errorf(t *testing.T, in string, fmtStr string, args ...any) { t.Helper() - vargs := []interface{}{in} + vargs := []any{in} for _, arg := range args { vargs = append(vargs, arg) } diff --git a/internal/errors/errors.go b/internal/errors/errors.go index d96719829..c2d6bd526 100644 --- a/internal/errors/errors.go +++ b/internal/errors/errors.go @@ -17,7 +17,7 @@ var Error = errors.New("protobuf error") // New formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func New(f string, x ...interface{}) error { +func New(f string, x ...any) error { return &prefixError{s: format(f, x...)} } @@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error { // Wrap returns an error that has a "proto" prefix, the formatted string described // by the format specifier and arguments, and a suffix of err. The error wraps err. -func Wrap(err error, f string, x ...interface{}) error { +func Wrap(err error, f string, x ...any) error { return &wrapError{ s: format(f, x...), err: err, @@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool { return target == Error } -func format(f string, x ...interface{}) string { +func format(f string, x ...any) string { // avoid "proto: " prefix when chaining for i := 0; i < len(x); i++ { switch e := x[i].(type) { diff --git a/internal/filedesc/desc_init.go b/internal/filedesc/desc_init.go index 3bc3b1cdf..8a57d60b0 100644 --- a/internal/filedesc/desc_init.go +++ b/internal/filedesc/desc_init.go @@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor } var nameBuilderPool = sync.Pool{ - New: func() interface{} { return new(strs.Builder) }, + New: func() any { return new(strs.Builder) }, } func getBuilder() *strs.Builder { diff --git a/internal/filedesc/desc_test.go b/internal/filedesc/desc_test.go index 4a8173086..182bf780f 100644 --- a/internal/filedesc/desc_test.go +++ b/internal/filedesc/desc_test.go @@ -223,7 +223,7 @@ func TestFile(t *testing.T) { func testFileAccessors(t *testing.T, fd protoreflect.FileDescriptor) { // Represent the descriptor as a map where each key is an accessor method // and the value is either the wanted tail value or another accessor map. - type M = map[string]interface{} + type M = map[string]any want := M{ "Parent": nil, "Index": 0, @@ -521,7 +521,7 @@ func testFileAccessors(t *testing.T, fd protoreflect.FileDescriptor) { } checkAccessors(t, "", reflect.ValueOf(fd), want) } -func checkAccessors(t *testing.T, p string, rv reflect.Value, want map[string]interface{}) { +func checkAccessors(t *testing.T, p string, rv reflect.Value, want map[string]any) { p0 := p defer func() { if ex := recover(); ex != nil { @@ -566,7 +566,7 @@ func checkAccessors(t *testing.T, p string, rv reflect.Value, want map[string]in } // Check that the accessor output matches. - if want, ok := v.(map[string]interface{}); ok { + if want, ok := v.(map[string]any); ok { checkAccessors(t, p, rets[0], want) continue } @@ -811,7 +811,7 @@ func testFileFormat(t *testing.T, fd protoreflect.FileDescriptor) { path string fmt string want string - val interface{} + val any }{ {"fd", "%v", compactMultiFormat(wantFileDescriptor), fd}, {"fd", "%+v", wantFileDescriptor, fd}, diff --git a/internal/filetype/build.go b/internal/filetype/build.go index f0e38c4ef..ba83fea44 100644 --- a/internal/filetype/build.go +++ b/internal/filetype/build.go @@ -68,7 +68,7 @@ type Builder struct { // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of // dependencies themselves is unspecified. - GoTypes []interface{} + GoTypes []any // DependencyIndexes is an ordered list of indexes into GoTypes for the // dependencies of messages, extensions, or services. @@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 { type ( resolverByIndex struct { - goTypes []interface{} + goTypes []any depIdxs depIdxs fileRegistry } diff --git a/internal/impl/api_export.go b/internal/impl/api_export.go index a371f98de..5d5771c2e 100644 --- a/internal/impl/api_export.go +++ b/internal/impl/api_export.go @@ -22,13 +22,13 @@ type Export struct{} // NewError formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func (Export) NewError(f string, x ...interface{}) error { +func (Export) NewError(f string, x ...any) error { return errors.New(f, x...) } // enum is any enum type generated by protoc-gen-go // and must be a named int32 type. -type enum = interface{} +type enum = any // EnumOf returns the protoreflect.Enum interface over e. // It returns nil if e is nil. @@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu // message is any message type generated by protoc-gen-go // and must be a pointer to a named struct type. -type message = interface{} +type message = any // legacyMessageWrapper wraps a v2 message as a v1 message. type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } diff --git a/internal/impl/convert.go b/internal/impl/convert.go index 185ef2efa..e06ece55a 100644 --- a/internal/impl/convert.go +++ b/internal/impl/convert.go @@ -14,7 +14,7 @@ import ( // unwrapper unwraps the value to the underlying value. // This is implemented by List and Map. type unwrapper interface { - protoUnwrap() interface{} + protoUnwrap() any } // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. diff --git a/internal/impl/convert_list.go b/internal/impl/convert_list.go index f89136516..18cb96fd7 100644 --- a/internal/impl/convert_list.go +++ b/internal/impl/convert_list.go @@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value { func (ls *listReflect) IsValid() bool { return !ls.v.IsNil() } -func (ls *listReflect) protoUnwrap() interface{} { +func (ls *listReflect) protoUnwrap() any { return ls.v.Interface() } diff --git a/internal/impl/convert_map.go b/internal/impl/convert_map.go index f30b0a057..304244a65 100644 --- a/internal/impl/convert_map.go +++ b/internal/impl/convert_map.go @@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value { func (ms *mapReflect) IsValid() bool { return !ms.v.IsNil() } -func (ms *mapReflect) protoUnwrap() interface{} { +func (ms *mapReflect) protoUnwrap() any { return ms.v.Interface() } diff --git a/internal/impl/extension.go b/internal/impl/extension.go index cb25b0bae..e31249f64 100644 --- a/internal/impl/extension.go +++ b/internal/impl/extension.go @@ -53,7 +53,7 @@ type ExtensionInfo struct { // type returned by InterfaceOf may not be identical. // // Deprecated: Use InterfaceOf(xt.Zero()) instead. - ExtensionType interface{} + ExtensionType any // Field is the field number of the extension. // @@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value { func (xi *ExtensionInfo) Zero() protoreflect.Value { return xi.lazyInit().Zero() } -func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { +func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value { return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { +func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any { return xi.lazyInit().GoValueOf(v).Interface() } func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { return xi.lazyInit().IsValidPB(v) } -func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { +func (xi *ExtensionInfo) IsValidInterface(v any) bool { return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) } func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { diff --git a/internal/impl/extension_test.go b/internal/impl/extension_test.go index e1868a5f0..c6645e9bf 100644 --- a/internal/impl/extension_test.go +++ b/internal/impl/extension_test.go @@ -24,7 +24,7 @@ func TestExtensionType(t *testing.T) { } for _, test := range []struct { xt protoreflect.ExtensionType - value interface{} + value any }{ { xt: testpb.E_OptionalInt32, diff --git a/internal/impl/lazy_test.go b/internal/impl/lazy_test.go index 0c06808a9..e9d6e8816 100644 --- a/internal/impl/lazy_test.go +++ b/internal/impl/lazy_test.go @@ -566,7 +566,7 @@ func (p pointer) Apply(f uintptr) pointer { return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} } -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { type ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer @@ -580,7 +580,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // Highly implementation dependent - uses unsafe pointers to figure // out if the lazyExtensionValue is initialized. -func extensionIsInitialized(t *testing.T, data interface{}, fieldNo int32) bool { +func extensionIsInitialized(t *testing.T, data any, fieldNo int32) bool { ext, ok := reflect.TypeOf(data).Elem().FieldByName("extensionFields") if !ok { t.Fatalf("Failed to retrieve offset of field \"extensionFields\".") diff --git a/internal/impl/legacy_aberrant_test.go b/internal/impl/legacy_aberrant_test.go index 905981a47..312baf37a 100644 --- a/internal/impl/legacy_aberrant_test.go +++ b/internal/impl/legacy_aberrant_test.go @@ -86,8 +86,8 @@ func (m *AberrantMessage) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { return []protoiface.ExtensionRangeV1{{Start: 10, End: 100}} } -func (m *AberrantMessage) XXX_OneofFuncs() []interface{} { - return []interface{}{ +func (m *AberrantMessage) XXX_OneofFuncs() []any { + return []any{ (*OneofBool)(nil), (*OneofInt32)(nil), (*OneofSint32)(nil), diff --git a/internal/impl/legacy_enum.go b/internal/impl/legacy_enum.go index c1c33d005..81b2b1a76 100644 --- a/internal/impl/legacy_enum.go +++ b/internal/impl/legacy_enum.go @@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { return e } -func (e *legacyEnumWrapper) protoUnwrap() interface{} { +func (e *legacyEnumWrapper) protoUnwrap() any { v := reflect.New(e.goTyp).Elem() v.SetInt(int64(e.num)) return v.Interface() diff --git a/internal/impl/legacy_file_test.go b/internal/impl/legacy_file_test.go index f08eb024a..501f2ceea 100644 --- a/internal/impl/legacy_file_test.go +++ b/internal/impl/legacy_file_test.go @@ -406,8 +406,8 @@ func TestDescriptor(t *testing.T) { pragma.DoNotImplement } opts := cmp.Options{ - cmp.Transformer("", func(x list) []interface{} { - out := make([]interface{}, x.Len()) + cmp.Transformer("", func(x list) []any { + out := make([]any, x.Len()) v := reflect.ValueOf(x) for i := 0; i < x.Len(); i++ { m := v.MethodByName("Get") @@ -415,8 +415,8 @@ func TestDescriptor(t *testing.T) { } return out }), - cmp.Transformer("", func(x protoreflect.Descriptor) map[string]interface{} { - out := make(map[string]interface{}) + cmp.Transformer("", func(x protoreflect.Descriptor) map[string]any { + out := make(map[string]any) v := reflect.ValueOf(x) for i := 0; i < v.NumMethod(); i++ { name := v.Type().Method(i).Name @@ -450,7 +450,7 @@ func TestDescriptor(t *testing.T) { } return out }), - cmp.Transformer("", func(v protoreflect.Value) interface{} { + cmp.Transformer("", func(v protoreflect.Value) any { return v.Interface() }), } diff --git a/internal/impl/legacy_message.go b/internal/impl/legacy_message.go index 950e9a1fe..bf0b6049b 100644 --- a/internal/impl/legacy_message.go +++ b/internal/impl/legacy_message.go @@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { for _, v := range vs { oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) } @@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool { func (m aberrantMessage) ProtoMethods() *protoiface.Methods { return aberrantProtoMethods } -func (m aberrantMessage) protoUnwrap() interface{} { +func (m aberrantMessage) protoUnwrap() any { return m.v.Interface() } diff --git a/internal/impl/legacy_test.go b/internal/impl/legacy_test.go index fe6400186..96e19b54a 100644 --- a/internal/impl/legacy_test.go +++ b/internal/impl/legacy_test.go @@ -345,7 +345,7 @@ func TestLegacyExtensions(t *testing.T) { // Check that getting the zero value returns the default value for scalars, // nil for singular messages, and an empty list for repeated fields. - defaultValues := map[int]interface{}{ + defaultValues := map[int]any{ 0: bool(true), 1: int32(-12345), 2: uint32(3200), @@ -358,7 +358,7 @@ func TestLegacyExtensions(t *testing.T) { 9: nil, } for i, xt := range extensionTypes { - var got interface{} + var got any xd := xt.TypeDescriptor() if !(xd.IsList() || xd.IsMap() || xd.Message() != nil) { got = xt.InterfaceOf(m.Get(xd)) @@ -382,7 +382,7 @@ func TestLegacyExtensions(t *testing.T) { m1b := &proto2_20180125.Message_ChildMessage{F1: proto.String("m2b")} m2a := &EnumMessages{EnumP2: EnumProto2(0x1b).Enum()} m2b := &EnumMessages{EnumP2: EnumProto2(0x2b).Enum()} - setValues := map[int]interface{}{ + setValues := map[int]any{ 0: bool(false), 1: int32(-54321), 2: uint32(6400), @@ -413,7 +413,7 @@ func TestLegacyExtensions(t *testing.T) { } // Get the values and check for equality. - getValues := map[int]interface{}{ + getValues := map[int]any{ 0: bool(false), 1: int32(-54321), 2: uint32(6400), @@ -486,8 +486,8 @@ func TestLegacyExtensionConvert(t *testing.T) { cmp.Comparer(func(x, y reflect.Type) bool { return x == y }), - cmp.Transformer("", func(x list) []interface{} { - out := make([]interface{}, x.Len()) + cmp.Transformer("", func(x list) []any { + out := make([]any, x.Len()) v := reflect.ValueOf(x) for i := 0; i < x.Len(); i++ { m := v.MethodByName("Get") @@ -495,8 +495,8 @@ func TestLegacyExtensionConvert(t *testing.T) { } return out }), - cmp.Transformer("", func(x protoreflect.Descriptor) map[string]interface{} { - out := make(map[string]interface{}) + cmp.Transformer("", func(x protoreflect.Descriptor) map[string]any { + out := make(map[string]any) v := reflect.ValueOf(x) for i := 0; i < v.NumMethod(); i++ { name := v.Type().Method(i).Name @@ -524,12 +524,12 @@ func TestLegacyExtensionConvert(t *testing.T) { } return out }), - cmp.Transformer("", func(xt protoreflect.ExtensionType) map[string]interface{} { - return map[string]interface{}{ + cmp.Transformer("", func(xt protoreflect.ExtensionType) map[string]any { + return map[string]any{ "Descriptor": xt.TypeDescriptor(), } }), - cmp.Transformer("", func(v protoreflect.Value) interface{} { + cmp.Transformer("", func(v protoreflect.Value) any { return v.Interface() }), } diff --git a/internal/impl/message.go b/internal/impl/message.go index 629bacdce..019399d45 100644 --- a/internal/impl/message.go +++ b/internal/impl/message.go @@ -35,7 +35,7 @@ type MessageInfo struct { Exporter exporter // OneofWrappers is list of pointers to oneof wrapper struct types. - OneofWrappers []interface{} + OneofWrappers []any initMu sync.Mutex // protects all unexported fields initDone uint32 @@ -47,7 +47,7 @@ type MessageInfo struct { // exporter is a function that returns a reference to the ith field of v, // where v is a pointer to a struct. It returns nil if it does not support // exporting the requested field (e.g., already exported). -type exporter func(v interface{}, i int) interface{} +type exporter func(v any, i int) any // getMessageInfo returns the MessageInfo for any message type that // is generated by our implementation of protoc-gen-go (for v2 and on). @@ -201,7 +201,7 @@ fieldLoop: } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { oneofWrappers = vs } } @@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { type mapEntryType struct { desc protoreflect.MessageDescriptor - valType interface{} // zero value of enum or message type + valType any // zero value of enum or message type } func (mt mapEntryType) New() protoreflect.Message { diff --git a/internal/impl/message_reflect.go b/internal/impl/message_reflect.go index 02ad46cee..ecb4623d7 100644 --- a/internal/impl/message_reflect.go +++ b/internal/impl/message_reflect.go @@ -20,7 +20,7 @@ type reflectMessageInfo struct { // fieldTypes contains the zero value of an enum or message field. // For lists, it contains the element type. // For maps, it contains the entry value type. - fieldTypes map[protoreflect.FieldNumber]interface{} + fieldTypes map[protoreflect.FieldNumber]any // denseFields is a subset of fields where: // 0 < fieldDesc.Number() < len(denseFields) @@ -28,7 +28,7 @@ type reflectMessageInfo struct { denseFields []*fieldInfo // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. - rangeInfos []interface{} // either *fieldInfo or *oneofInfo + rangeInfos []any // either *fieldInfo or *oneofInfo getUnknown func(pointer) protoreflect.RawFields setUnknown func(pointer, protoreflect.RawFields) @@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } if ft != nil { if mi.fieldTypes == nil { - mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) + mi.fieldTypes = make(map[protoreflect.FieldNumber]any) } mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() } @@ -393,7 +393,7 @@ var ( // MessageOf returns a reflective view over a message. The input must be a // pointer to a named Go struct. If the provided type has a ProtoReflect method, // it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { +func (mi *MessageInfo) MessageOf(m any) protoreflect.Message { if reflect.TypeOf(m) != mi.GoReflectType { panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) } @@ -421,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() { func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { return (*messageReflectWrapper)(m) } -func (m *messageIfaceWrapper) protoUnwrap() interface{} { +func (m *messageIfaceWrapper) protoUnwrap() any { return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) } diff --git a/internal/impl/message_reflect_gen.go b/internal/impl/message_reflect_gen.go index 29ba6bd35..99dc23c6f 100644 --- a/internal/impl/message_reflect_gen.go +++ b/internal/impl/message_reflect_gen.go @@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message { func (m *messageState) Interface() protoreflect.ProtoMessage { return m.protoUnwrap().(protoreflect.ProtoMessage) } -func (m *messageState) protoUnwrap() interface{} { +func (m *messageState) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageState) ProtoMethods() *protoiface.Methods { @@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { } return (*messageIfaceWrapper)(m) } -func (m *messageReflectWrapper) protoUnwrap() interface{} { +func (m *messageReflectWrapper) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { diff --git a/internal/impl/message_reflect_test.go b/internal/impl/message_reflect_test.go index c14bdbd93..f11e2cb74 100644 --- a/internal/impl/message_reflect_test.go +++ b/internal/impl/message_reflect_test.go @@ -115,17 +115,17 @@ type ( // check that map length matches lenMap int // check presence for specific entries in the map - hasMap map[interface{}]bool + hasMap map[any]bool // check that specific map entries match - getMap map[interface{}]protoreflect.Value + getMap map[any]protoreflect.Value // set specific map entries - setMap map[interface{}]protoreflect.Value + setMap map[any]protoreflect.Value // clear specific entries in the map - clearMap []interface{} + clearMap []any // apply messageOps on each specified message entry - messageMap map[interface{}]messageOps + messageMap map[any]messageOps // range through all entries and check that they match - rangeMap map[interface{}]protoreflect.Value + rangeMap map[any]protoreflect.Value ) func (equalMap) isMapOp() {} @@ -798,8 +798,8 @@ var oneofScalarsType = pimpl.MessageInfo{GoReflectType: reflect.TypeOf(new(Oneof func (m *OneofScalars) ProtoReflect() protoreflect.Message { return oneofScalarsType.MessageOf(m) } -func (*OneofScalars) XXX_OneofWrappers() []interface{} { - return []interface{}{ +func (*OneofScalars) XXX_OneofWrappers() []any { + return []any{ (*OneofScalars_Bool)(nil), (*OneofScalars_Int32)(nil), (*OneofScalars_Int64)(nil), @@ -1011,8 +1011,8 @@ func newFileRegistry(files ...protoreflect.FileDescriptor) *protoregistry.Files func (m *EnumMessages) ProtoReflect() protoreflect.Message { return enumMessagesType.MessageOf(m) } -func (*EnumMessages) XXX_OneofWrappers() []interface{} { - return []interface{}{ +func (*EnumMessages) XXX_OneofWrappers() []any { + return []any{ (*EnumMessages_OneofE2)(nil), (*EnumMessages_OneofE3)(nil), (*EnumMessages_OneofM2)(nil), @@ -1161,7 +1161,7 @@ var cmpOpts = cmp.Options{ my := pimpl.Export{}.MessageOf(y).Interface() return proto.Equal(mx, my) }), - cmp.Transformer("UnwrapValue", func(pv protoreflect.Value) interface{} { + cmp.Transformer("UnwrapValue", func(pv protoreflect.Value) any { switch v := pv.Interface().(type) { case protoreflect.Message: out := make(map[protoreflect.FieldNumber]protoreflect.Value) @@ -1177,7 +1177,7 @@ var cmpOpts = cmp.Options{ } return out case protoreflect.Map: - out := make(map[interface{}]protoreflect.Value) + out := make(map[any]protoreflect.Value) v.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { out[k.Interface()] = v return true @@ -1359,8 +1359,8 @@ func testMaps(t *testing.T, p path, m protoreflect.Map, tt mapOps) { t.Errorf("operation %v, Map.Len = %d, want %d", p, got, want) } case hasMap: - got := map[interface{}]bool{} - want := map[interface{}]bool(op) + got := map[any]bool{} + want := map[any]bool(op) for k := range want { got[k] = m.Has(V(k).MapKey()) } @@ -1368,8 +1368,8 @@ func testMaps(t *testing.T, p path, m protoreflect.Map, tt mapOps) { t.Errorf("operation %v, Map.Has mismatch (-want, +got):\n%s", p, diff) } case getMap: - got := map[interface{}]protoreflect.Value{} - want := map[interface{}]protoreflect.Value(op) + got := map[any]protoreflect.Value{} + want := map[any]protoreflect.Value(op) for k := range want { got[k] = m.Get(V(k).MapKey()) } @@ -1393,8 +1393,8 @@ func testMaps(t *testing.T, p path, m protoreflect.Map, tt mapOps) { testMessage(t, p, m.Get(mk).Message(), tt) } case rangeMap: - got := map[interface{}]protoreflect.Value{} - want := map[interface{}]protoreflect.Value(op) + got := map[any]protoreflect.Value{} + want := map[any]protoreflect.Value(op) m.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { got[k.Interface()] = v return true diff --git a/internal/impl/pointer_reflect.go b/internal/impl/pointer_reflect.go index 517e94434..da685e8a2 100644 --- a/internal/impl/pointer_reflect.go +++ b/internal/impl/pointer_reflect.go @@ -16,7 +16,7 @@ import ( const UnsafeEnabled = false // Pointer is an opaque pointer type. -type Pointer interface{} +type Pointer any // offset represents the offset to a struct field, accessible from a pointer. // The offset is the field index into a struct. @@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { return pointer{v: reflect.ValueOf(v)} } @@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { return p.AsValueOf(t).Interface() } diff --git a/internal/impl/pointer_unsafe.go b/internal/impl/pointer_unsafe.go index 4b020e311..5f20ca5d8 100644 --- a/internal/impl/pointer_unsafe.go +++ b/internal/impl/pointer_unsafe.go @@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { type ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer @@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { // TODO: Use tricky unsafe magic to directly create ifaceHeader. return p.AsValueOf(t).Interface() } diff --git a/internal/msgfmt/format.go b/internal/msgfmt/format.go index a319550f6..17b3f27b8 100644 --- a/internal/msgfmt/format.go +++ b/internal/msgfmt/format.go @@ -86,7 +86,7 @@ func appendMessage(b []byte, m protoreflect.Message) []byte { return b } -var protocmpMessageType = reflect.TypeOf(map[string]interface{}(nil)) +var protocmpMessageType = reflect.TypeOf(map[string]any(nil)) func appendKnownMessage(b []byte, m protoreflect.Message) []byte { md := m.Descriptor() @@ -98,7 +98,7 @@ func appendKnownMessage(b []byte, m protoreflect.Message) []byte { if v := reflect.ValueOf(m); v.Type().ConvertibleTo(protocmpMessageType) { // For protocmp.Message, directly obtain the sub-message value // which is stored in structured form, rather than as raw bytes. - m2 := v.Convert(protocmpMessageType).Interface().(map[string]interface{}) + m2 := v.Convert(protocmpMessageType).Interface().(map[string]any) v, ok := m2[string(genid.Any_Value_field_name)].(proto.Message) if !ok { return nil diff --git a/internal/order/order_test.go b/internal/order/order_test.go index 94de4212d..3940fda56 100644 --- a/internal/order/order_test.go +++ b/internal/order/order_test.go @@ -126,31 +126,31 @@ func TestKeyOrder(t *testing.T) { tests := []struct { label string order KeyOrder - keys []interface{} + keys []any }{{ label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{false, true}, + keys: []any{false, true}, }, { label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{int32(-100), int32(-99), int32(-10), int32(-9), int32(-1), int32(0), int32(+1), int32(+9), int32(+10), int32(+99), int32(+100)}, + keys: []any{int32(-100), int32(-99), int32(-10), int32(-9), int32(-1), int32(0), int32(+1), int32(+9), int32(+10), int32(+99), int32(+100)}, }, { label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{int64(-100), int64(-99), int64(-10), int64(-9), int64(-1), int64(0), int64(+1), int64(+9), int64(+10), int64(+99), int64(+100)}, + keys: []any{int64(-100), int64(-99), int64(-10), int64(-9), int64(-1), int64(0), int64(+1), int64(+9), int64(+10), int64(+99), int64(+100)}, }, { label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{uint32(0), uint32(1), uint32(9), uint32(10), uint32(99), uint32(100)}, + keys: []any{uint32(0), uint32(1), uint32(9), uint32(10), uint32(99), uint32(100)}, }, { label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{uint64(0), uint64(1), uint64(9), uint64(10), uint64(99), uint64(100)}, + keys: []any{uint64(0), uint64(1), uint64(9), uint64(10), uint64(99), uint64(100)}, }, { label: "GenericKeyOrder", order: GenericKeyOrder, - keys: []interface{}{"", "a", "aa", "ab", "ba", "bb", "\u0080", "\u0080\u0081", "\u0082\u0080"}, + keys: []any{"", "a", "aa", "ab", "ba", "bb", "\u0080", "\u0080\u0081", "\u0082\u0080"}, }} for _, tt := range tests { diff --git a/internal/order/range.go b/internal/order/range.go index 1665a68e5..a1f09162d 100644 --- a/internal/order/range.go +++ b/internal/order/range.go @@ -18,7 +18,7 @@ type messageField struct { } var messageFieldPool = sync.Pool{ - New: func() interface{} { return new([]messageField) }, + New: func() any { return new([]messageField) }, } type ( @@ -69,7 +69,7 @@ type mapEntry struct { } var mapEntryPool = sync.Pool{ - New: func() interface{} { return new([]mapEntry) }, + New: func() any { return new([]mapEntry) }, } type ( diff --git a/internal/protobuild/build.go b/internal/protobuild/build.go index e432c3b67..ff89c1482 100644 --- a/internal/protobuild/build.go +++ b/internal/protobuild/build.go @@ -29,7 +29,7 @@ import ( // • A string containing the value name may be assigned to an enum field. // // • A slice may be assigned to a list, and a map may be assigned to a map. -type Value interface{} +type Value any // A Message is a template to apply to a message. Keys are field names, including // extension names. @@ -101,7 +101,7 @@ func (template Message) Build(m protoreflect.Message) { } } -func fieldValue(fd protoreflect.FieldDescriptor, v interface{}) protoreflect.Value { +func fieldValue(fd protoreflect.FieldDescriptor, v any) protoreflect.Value { switch o := v.(type) { case int: switch fd.Kind() { diff --git a/internal/protolegacy/proto.go b/internal/protolegacy/proto.go index 7c0919393..03a9055bb 100644 --- a/internal/protolegacy/proto.go +++ b/internal/protolegacy/proto.go @@ -66,7 +66,7 @@ func RegisterType(m Message, s string) { } } -func RegisterMapType(interface{}, string) { +func RegisterMapType(any, string) { // Do nothing. } diff --git a/internal/testprotos/annotation/annotation.pb.go b/internal/testprotos/annotation/annotation.pb.go index f09bc4175..7b4b998d9 100644 --- a/internal/testprotos/annotation/annotation.pb.go +++ b/internal/testprotos/annotation/annotation.pb.go @@ -56,7 +56,7 @@ var file_internal_testprotos_annotation_annotation_proto_rawDesc = []byte{ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, } -var file_internal_testprotos_annotation_annotation_proto_goTypes = []interface{}{ +var file_internal_testprotos_annotation_annotation_proto_goTypes = []any{ (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions } var file_internal_testprotos_annotation_annotation_proto_depIdxs = []int32{ diff --git a/internal/testprotos/benchmarks/micro/micro.pb.go b/internal/testprotos/benchmarks/micro/micro.pb.go index 591b8e639..3dd3da378 100644 --- a/internal/testprotos/benchmarks/micro/micro.pb.go +++ b/internal/testprotos/benchmarks/micro/micro.pb.go @@ -227,7 +227,7 @@ func file_internal_testprotos_benchmarks_micro_micro_proto_rawDescGZIP() []byte } var file_internal_testprotos_benchmarks_micro_micro_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_benchmarks_micro_micro_proto_goTypes = []interface{}{ +var file_internal_testprotos_benchmarks_micro_micro_proto_goTypes = []any{ (*SixteenRequired)(nil), // 0: goproto.proto.benchmarks.microt.SixteenRequired } var file_internal_testprotos_benchmarks_micro_micro_proto_depIdxs = []int32{ @@ -244,7 +244,7 @@ func file_internal_testprotos_benchmarks_micro_micro_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_benchmarks_micro_micro_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_benchmarks_micro_micro_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SixteenRequired); i { case 0: return &v.state diff --git a/internal/testprotos/conformance/conformance.pb.go b/internal/testprotos/conformance/conformance.pb.go index 4852b90b4..b8f904f03 100644 --- a/internal/testprotos/conformance/conformance.pb.go +++ b/internal/testprotos/conformance/conformance.pb.go @@ -714,7 +714,7 @@ func file_conformance_conformance_proto_rawDescGZIP() []byte { var file_conformance_conformance_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_conformance_conformance_proto_goTypes = []interface{}{ +var file_conformance_conformance_proto_goTypes = []any{ (WireFormat)(0), // 0: conformance.WireFormat (TestCategory)(0), // 1: conformance.TestCategory (*FailureSet)(nil), // 2: conformance.FailureSet @@ -739,7 +739,7 @@ func file_conformance_conformance_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_conformance_conformance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conformance_conformance_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FailureSet); i { case 0: return &v.state @@ -751,7 +751,7 @@ func file_conformance_conformance_proto_init() { return nil } } - file_conformance_conformance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conformance_conformance_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ConformanceRequest); i { case 0: return &v.state @@ -763,7 +763,7 @@ func file_conformance_conformance_proto_init() { return nil } } - file_conformance_conformance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conformance_conformance_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ConformanceResponse); i { case 0: return &v.state @@ -775,7 +775,7 @@ func file_conformance_conformance_proto_init() { return nil } } - file_conformance_conformance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conformance_conformance_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*JspbEncodingConfig); i { case 0: return &v.state @@ -788,13 +788,13 @@ func file_conformance_conformance_proto_init() { } } } - file_conformance_conformance_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_conformance_conformance_proto_msgTypes[1].OneofWrappers = []any{ (*ConformanceRequest_ProtobufPayload)(nil), (*ConformanceRequest_JsonPayload)(nil), (*ConformanceRequest_JspbPayload)(nil), (*ConformanceRequest_TextPayload)(nil), } - file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []any{ (*ConformanceResponse_ParseError)(nil), (*ConformanceResponse_SerializeError)(nil), (*ConformanceResponse_TimeoutError)(nil), diff --git a/internal/testprotos/conformance/editions/test_messages_edition2023.pb.go b/internal/testprotos/conformance/editions/test_messages_edition2023.pb.go index b70b30edc..c15a00062 100644 --- a/internal/testprotos/conformance/editions/test_messages_edition2023.pb.go +++ b/internal/testprotos/conformance/editions/test_messages_edition2023.pb.go @@ -1898,7 +1898,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_rawDescGZIP() var file_conformance_test_protos_test_messages_edition2023_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_conformance_test_protos_test_messages_edition2023_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_conformance_test_protos_test_messages_edition2023_proto_goTypes = []interface{}{ +var file_conformance_test_protos_test_messages_edition2023_proto_goTypes = []any{ (ForeignEnumEdition2023)(0), // 0: protobuf_test_messages.editions.ForeignEnumEdition2023 (TestAllTypesEdition2023_NestedEnum)(0), // 1: protobuf_test_messages.editions.TestAllTypesEdition2023.NestedEnum (*TestAllTypesEdition2023)(nil), // 2: protobuf_test_messages.editions.TestAllTypesEdition2023 @@ -1984,7 +1984,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesEdition2023); i { case 0: return &v.state @@ -1998,7 +1998,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { return nil } } - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessageEdition2023); i { case 0: return &v.state @@ -2010,7 +2010,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { return nil } } - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GroupLikeType); i { case 0: return &v.state @@ -2022,7 +2022,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { return nil } } - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesEdition2023_NestedMessage); i { case 0: return &v.state @@ -2034,7 +2034,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { return nil } } - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesEdition2023_GroupLikeType); i { case 0: return &v.state @@ -2047,7 +2047,7 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() { } } } - file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesEdition2023_OneofUint32)(nil), (*TestAllTypesEdition2023_OneofNestedMessage)(nil), (*TestAllTypesEdition2023_OneofString)(nil), diff --git a/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go b/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go index b00f2b10c..e14ad7b35 100644 --- a/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go +++ b/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go @@ -3888,7 +3888,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_rawDescGZIP() []by var file_editions_golden_test_messages_proto2_editions_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_editions_golden_test_messages_proto2_editions_proto_msgTypes = make([]protoimpl.MessageInfo, 40) -var file_editions_golden_test_messages_proto2_editions_proto_goTypes = []interface{}{ +var file_editions_golden_test_messages_proto2_editions_proto_goTypes = []any{ (ForeignEnumProto2)(0), // 0: protobuf_test_messages.editions.proto2.ForeignEnumProto2 (TestAllTypesProto2_NestedEnum)(0), // 1: protobuf_test_messages.editions.proto2.TestAllTypesProto2.NestedEnum (EnumOnlyProto2_Bool)(0), // 2: protobuf_test_messages.editions.proto2.EnumOnlyProto2.Bool @@ -4009,7 +4009,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2); i { case 0: return &v.state @@ -4023,7 +4023,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessageProto2); i { case 0: return &v.state @@ -4035,7 +4035,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GroupField); i { case 0: return &v.state @@ -4047,7 +4047,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UnknownToTestAllTypes); i { case 0: return &v.state @@ -4059,7 +4059,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*NullHypothesisProto2); i { case 0: return &v.state @@ -4071,7 +4071,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*EnumOnlyProto2); i { case 0: return &v.state @@ -4083,7 +4083,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*OneStringProto2); i { case 0: return &v.state @@ -4095,7 +4095,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ProtoWithKeywords); i { case 0: return &v.state @@ -4107,7 +4107,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2); i { case 0: return &v.state @@ -4121,7 +4121,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_NestedMessage); i { case 0: return &v.state @@ -4133,7 +4133,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_Data); i { case 0: return &v.state @@ -4145,7 +4145,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MultiWordGroupField); i { case 0: return &v.state @@ -4157,7 +4157,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrect); i { case 0: return &v.state @@ -4171,7 +4171,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension1); i { case 0: return &v.state @@ -4183,7 +4183,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension2); i { case 0: return &v.state @@ -4195,7 +4195,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*UnknownToTestAllTypes_OptionalGroup); i { case 0: return &v.state @@ -4207,7 +4207,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_NestedMessage); i { case 0: return &v.state @@ -4219,7 +4219,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_Data); i { case 0: return &v.state @@ -4231,7 +4231,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrect); i { case 0: return &v.state @@ -4245,7 +4245,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension1); i { case 0: return &v.state @@ -4257,7 +4257,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension2); i { case 0: return &v.state @@ -4270,7 +4270,7 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() { } } } - file_editions_golden_test_messages_proto2_editions_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_editions_golden_test_messages_proto2_editions_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto2_OneofUint32)(nil), (*TestAllTypesProto2_OneofNestedMessage)(nil), (*TestAllTypesProto2_OneofString)(nil), diff --git a/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go b/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go index 99c10b15d..07e5a6483 100644 --- a/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go +++ b/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go @@ -2552,7 +2552,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_rawDescGZIP() []by var file_editions_golden_test_messages_proto3_editions_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_editions_golden_test_messages_proto3_editions_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_editions_golden_test_messages_proto3_editions_proto_goTypes = []interface{}{ +var file_editions_golden_test_messages_proto3_editions_proto_goTypes = []any{ (ForeignEnum)(0), // 0: protobuf_test_messages.editions.proto3.ForeignEnum (TestAllTypesProto3_NestedEnum)(0), // 1: protobuf_test_messages.editions.proto3.TestAllTypesProto3.NestedEnum (TestAllTypesProto3_AliasedEnum)(0), // 2: protobuf_test_messages.editions.proto3.TestAllTypesProto3.AliasedEnum @@ -2684,7 +2684,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3); i { case 0: return &v.state @@ -2696,7 +2696,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessage); i { case 0: return &v.state @@ -2708,7 +2708,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NullHypothesisProto3); i { case 0: return &v.state @@ -2720,7 +2720,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*EnumOnlyProto3); i { case 0: return &v.state @@ -2732,7 +2732,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { return nil } } - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3_NestedMessage); i { case 0: return &v.state @@ -2745,7 +2745,7 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() { } } } - file_editions_golden_test_messages_proto3_editions_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_editions_golden_test_messages_proto3_editions_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto3_OneofUint32)(nil), (*TestAllTypesProto3_OneofNestedMessage)(nil), (*TestAllTypesProto3_OneofString)(nil), diff --git a/internal/testprotos/conformance/test_messages_proto2.pb.go b/internal/testprotos/conformance/test_messages_proto2.pb.go index 545fff42f..81921ee65 100644 --- a/internal/testprotos/conformance/test_messages_proto2.pb.go +++ b/internal/testprotos/conformance/test_messages_proto2.pb.go @@ -3871,7 +3871,7 @@ func file_google_protobuf_test_messages_proto2_proto_rawDescGZIP() []byte { var file_google_protobuf_test_messages_proto2_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 40) -var file_google_protobuf_test_messages_proto2_proto_goTypes = []interface{}{ +var file_google_protobuf_test_messages_proto2_proto_goTypes = []any{ (ForeignEnumProto2)(0), // 0: protobuf_test_messages.proto2.ForeignEnumProto2 (TestAllTypesProto2_NestedEnum)(0), // 1: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum (EnumOnlyProto2_Bool)(0), // 2: protobuf_test_messages.proto2.EnumOnlyProto2.Bool @@ -3992,7 +3992,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_test_messages_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2); i { case 0: return &v.state @@ -4006,7 +4006,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessageProto2); i { case 0: return &v.state @@ -4018,7 +4018,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*GroupField); i { case 0: return &v.state @@ -4030,7 +4030,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UnknownToTestAllTypes); i { case 0: return &v.state @@ -4042,7 +4042,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*NullHypothesisProto2); i { case 0: return &v.state @@ -4054,7 +4054,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*EnumOnlyProto2); i { case 0: return &v.state @@ -4066,7 +4066,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*OneStringProto2); i { case 0: return &v.state @@ -4078,7 +4078,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*ProtoWithKeywords); i { case 0: return &v.state @@ -4090,7 +4090,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2); i { case 0: return &v.state @@ -4104,7 +4104,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_NestedMessage); i { case 0: return &v.state @@ -4116,7 +4116,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_Data); i { case 0: return &v.state @@ -4128,7 +4128,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MultiWordGroupField); i { case 0: return &v.state @@ -4140,7 +4140,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrect); i { case 0: return &v.state @@ -4154,7 +4154,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension1); i { case 0: return &v.state @@ -4166,7 +4166,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[33].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension2); i { case 0: return &v.state @@ -4178,7 +4178,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[34].Exporter = func(v any, i int) any { switch v := v.(*UnknownToTestAllTypes_OptionalGroup); i { case 0: return &v.state @@ -4190,7 +4190,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[35].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_NestedMessage); i { case 0: return &v.state @@ -4202,7 +4202,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[36].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_Data); i { case 0: return &v.state @@ -4214,7 +4214,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[37].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrect); i { case 0: return &v.state @@ -4228,7 +4228,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[38].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension1); i { case 0: return &v.state @@ -4240,7 +4240,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { return nil } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto2_proto_msgTypes[39].Exporter = func(v any, i int) any { switch v := v.(*TestAllRequiredTypesProto2_MessageSetCorrectExtension2); i { case 0: return &v.state @@ -4253,7 +4253,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() { } } } - file_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto2_OneofUint32)(nil), (*TestAllTypesProto2_OneofNestedMessage)(nil), (*TestAllTypesProto2_OneofString)(nil), diff --git a/internal/testprotos/conformance/test_messages_proto3.pb.go b/internal/testprotos/conformance/test_messages_proto3.pb.go index 56b799ecc..193771a83 100644 --- a/internal/testprotos/conformance/test_messages_proto3.pb.go +++ b/internal/testprotos/conformance/test_messages_proto3.pb.go @@ -2529,7 +2529,7 @@ func file_google_protobuf_test_messages_proto3_proto_rawDescGZIP() []byte { var file_google_protobuf_test_messages_proto3_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_google_protobuf_test_messages_proto3_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_google_protobuf_test_messages_proto3_proto_goTypes = []interface{}{ +var file_google_protobuf_test_messages_proto3_proto_goTypes = []any{ (ForeignEnum)(0), // 0: protobuf_test_messages.proto3.ForeignEnum (TestAllTypesProto3_NestedEnum)(0), // 1: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum (TestAllTypesProto3_AliasedEnum)(0), // 2: protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum @@ -2661,7 +2661,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_test_messages_proto3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto3_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3); i { case 0: return &v.state @@ -2673,7 +2673,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { return nil } } - file_google_protobuf_test_messages_proto3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto3_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessage); i { case 0: return &v.state @@ -2685,7 +2685,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { return nil } } - file_google_protobuf_test_messages_proto3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto3_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*NullHypothesisProto3); i { case 0: return &v.state @@ -2697,7 +2697,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { return nil } } - file_google_protobuf_test_messages_proto3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto3_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*EnumOnlyProto3); i { case 0: return &v.state @@ -2709,7 +2709,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { return nil } } - file_google_protobuf_test_messages_proto3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_test_messages_proto3_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3_NestedMessage); i { case 0: return &v.state @@ -2722,7 +2722,7 @@ func file_google_protobuf_test_messages_proto3_proto_init() { } } } - file_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto3_OneofUint32)(nil), (*TestAllTypesProto3_OneofNestedMessage)(nil), (*TestAllTypesProto3_OneofString)(nil), diff --git a/internal/testprotos/editionsfuzztest/test2.pb.go b/internal/testprotos/editionsfuzztest/test2.pb.go index 126d3f4ec..8f43c58f0 100644 --- a/internal/testprotos/editionsfuzztest/test2.pb.go +++ b/internal/testprotos/editionsfuzztest/test2.pb.go @@ -1561,7 +1561,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_rawDescGZIP() []byte var file_internal_testprotos_editionsfuzztest_test2_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_internal_testprotos_editionsfuzztest_test2_proto_goTypes = []interface{}{ +var file_internal_testprotos_editionsfuzztest_test2_proto_goTypes = []any{ (TestAllTypesProto2_NestedEnum)(0), // 0: goproto.proto.test.TestAllTypesProto2.NestedEnum (*TestAllTypesProto2)(nil), // 1: goproto.proto.test.TestAllTypesProto2 (*TestAllTypesProto2_NestedMessage)(nil), // 2: goproto.proto.test.TestAllTypesProto2.NestedMessage @@ -1632,7 +1632,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2); i { case 0: return &v.state @@ -1644,7 +1644,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_NestedMessage); i { case 0: return &v.state @@ -1656,7 +1656,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_OptionalGroup); i { case 0: return &v.state @@ -1668,7 +1668,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_RepeatedGroup); i { case 0: return &v.state @@ -1680,7 +1680,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2_OneofGroup); i { case 0: return &v.state @@ -1693,7 +1693,7 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() { } } } - file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto2_OneofUint32)(nil), (*TestAllTypesProto2_OneofNestedMessage)(nil), (*TestAllTypesProto2_OneofString)(nil), diff --git a/internal/testprotos/editionsfuzztest/test2editions.pb.go b/internal/testprotos/editionsfuzztest/test2editions.pb.go index 8835ced25..ea0979c08 100644 --- a/internal/testprotos/editionsfuzztest/test2editions.pb.go +++ b/internal/testprotos/editionsfuzztest/test2editions.pb.go @@ -1585,7 +1585,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_rawDescGZIP() var file_internal_testprotos_editionsfuzztest_test2editions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_internal_testprotos_editionsfuzztest_test2editions_proto_goTypes = []interface{}{ +var file_internal_testprotos_editionsfuzztest_test2editions_proto_goTypes = []any{ (TestAllTypesProto2Editions_NestedEnum)(0), // 0: goproto.proto.test.TestAllTypesProto2Editions.NestedEnum (*TestAllTypesProto2Editions)(nil), // 1: goproto.proto.test.TestAllTypesProto2Editions (*TestAllTypesProto2Editions_NestedMessage)(nil), // 2: goproto.proto.test.TestAllTypesProto2Editions.NestedMessage @@ -1656,7 +1656,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2Editions); i { case 0: return &v.state @@ -1668,7 +1668,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2Editions_NestedMessage); i { case 0: return &v.state @@ -1680,7 +1680,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2Editions_OptionalGroup); i { case 0: return &v.state @@ -1692,7 +1692,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2Editions_RepeatedGroup); i { case 0: return &v.state @@ -1704,7 +1704,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto2Editions_OneofGroup); i { case 0: return &v.state @@ -1717,7 +1717,7 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() { } } } - file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto2Editions_OneofUint32)(nil), (*TestAllTypesProto2Editions_OneofNestedMessage)(nil), (*TestAllTypesProto2Editions_OneofString)(nil), diff --git a/internal/testprotos/editionsfuzztest/test3.pb.go b/internal/testprotos/editionsfuzztest/test3.pb.go index 9d2cbe26a..172968147 100644 --- a/internal/testprotos/editionsfuzztest/test3.pb.go +++ b/internal/testprotos/editionsfuzztest/test3.pb.go @@ -1494,7 +1494,7 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_rawDescGZIP() []byte var file_internal_testprotos_editionsfuzztest_test3_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_internal_testprotos_editionsfuzztest_test3_proto_goTypes = []interface{}{ +var file_internal_testprotos_editionsfuzztest_test3_proto_goTypes = []any{ (ForeignEnumProto3)(0), // 0: goproto.proto.test.ForeignEnumProto3 (TestAllTypesProto3_NestedEnum)(0), // 1: goproto.proto.test.TestAllTypesProto3.NestedEnum (*TestAllTypesProto3)(nil), // 2: goproto.proto.test.TestAllTypesProto3 @@ -1566,7 +1566,7 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3); i { case 0: return &v.state @@ -1578,7 +1578,7 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessageProto3); i { case 0: return &v.state @@ -1590,7 +1590,7 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3_NestedMessage); i { case 0: return &v.state @@ -1603,7 +1603,7 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_init() { } } } - file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto3_OneofUint32)(nil), (*TestAllTypesProto3_OneofNestedMessage)(nil), (*TestAllTypesProto3_OneofString)(nil), diff --git a/internal/testprotos/editionsfuzztest/test3editions.pb.go b/internal/testprotos/editionsfuzztest/test3editions.pb.go index f0a6fd0a4..7e23edbe0 100644 --- a/internal/testprotos/editionsfuzztest/test3editions.pb.go +++ b/internal/testprotos/editionsfuzztest/test3editions.pb.go @@ -1492,7 +1492,7 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_rawDescGZIP() var file_internal_testprotos_editionsfuzztest_test3editions_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_internal_testprotos_editionsfuzztest_test3editions_proto_goTypes = []interface{}{ +var file_internal_testprotos_editionsfuzztest_test3editions_proto_goTypes = []any{ (ForeignEnumProto3Editions)(0), // 0: goproto.proto.test.ForeignEnumProto3Editions (TestAllTypesProto3Editions_NestedEnum)(0), // 1: goproto.proto.test.TestAllTypesProto3Editions.NestedEnum (*TestAllTypesProto3Editions)(nil), // 2: goproto.proto.test.TestAllTypesProto3Editions @@ -1564,7 +1564,7 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3Editions); i { case 0: return &v.state @@ -1576,7 +1576,7 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessageProto3Editions); i { case 0: return &v.state @@ -1588,7 +1588,7 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_init() { return nil } } - file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypesProto3Editions_NestedMessage); i { case 0: return &v.state @@ -1601,7 +1601,7 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_init() { } } } - file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypesProto3Editions_OneofUint32)(nil), (*TestAllTypesProto3Editions_OneofNestedMessage)(nil), (*TestAllTypesProto3Editions_OneofString)(nil), diff --git a/internal/testprotos/enums/enums.pb.go b/internal/testprotos/enums/enums.pb.go index 061d11218..b861bb5df 100644 --- a/internal/testprotos/enums/enums.pb.go +++ b/internal/testprotos/enums/enums.pb.go @@ -122,7 +122,7 @@ func file_internal_testprotos_enums_enums_proto_rawDescGZIP() []byte { } var file_internal_testprotos_enums_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_internal_testprotos_enums_enums_proto_goTypes = []interface{}{ +var file_internal_testprotos_enums_enums_proto_goTypes = []any{ (Enum)(0), // 0: goproto.proto.enums.Enum } var file_internal_testprotos_enums_enums_proto_depIdxs = []int32{ diff --git a/internal/testprotos/fieldtrack/fieldtrack.pb.go b/internal/testprotos/fieldtrack/fieldtrack.pb.go index d2a9812ca..b4f76bd15 100644 --- a/internal/testprotos/fieldtrack/fieldtrack.pb.go +++ b/internal/testprotos/fieldtrack/fieldtrack.pb.go @@ -947,7 +947,7 @@ func file_internal_testprotos_fieldtrack_fieldtrack_proto_rawDescGZIP() []byte { } var file_internal_testprotos_fieldtrack_fieldtrack_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_internal_testprotos_fieldtrack_fieldtrack_proto_goTypes = []interface{}{ +var file_internal_testprotos_fieldtrack_fieldtrack_proto_goTypes = []any{ (*TestFieldTrack)(nil), // 0: goproto.proto.test.TestFieldTrack nil, // 1: goproto.proto.test.TestFieldTrack.MapStringInt32Entry nil, // 2: goproto.proto.test.TestFieldTrack.MapStringInt64Entry @@ -1006,7 +1006,7 @@ func file_internal_testprotos_fieldtrack_fieldtrack_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_fieldtrack_fieldtrack_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_fieldtrack_fieldtrack_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestFieldTrack); i { case 0: return &v.state diff --git a/internal/testprotos/fuzz/fuzz.pb.go b/internal/testprotos/fuzz/fuzz.pb.go index 29d750897..d4505af83 100644 --- a/internal/testprotos/fuzz/fuzz.pb.go +++ b/internal/testprotos/fuzz/fuzz.pb.go @@ -194,7 +194,7 @@ func file_internal_testprotos_fuzz_fuzz_proto_rawDescGZIP() []byte { } var file_internal_testprotos_fuzz_fuzz_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_fuzz_fuzz_proto_goTypes = []interface{}{ +var file_internal_testprotos_fuzz_fuzz_proto_goTypes = []any{ (*Fuzz)(nil), // 0: goproto.proto.fuzz.Fuzz (*test.TestAllTypes)(nil), // 1: goproto.proto.test.TestAllTypes (*test.TestAllExtensions)(nil), // 2: goproto.proto.test.TestAllExtensions @@ -227,7 +227,7 @@ func file_internal_testprotos_fuzz_fuzz_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_fuzz_fuzz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_fuzz_fuzz_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Fuzz); i { case 0: return &v.state diff --git a/internal/testprotos/irregular/test.pb.go b/internal/testprotos/irregular/test.pb.go index f375c48fc..a2bf282d9 100644 --- a/internal/testprotos/irregular/test.pb.go +++ b/internal/testprotos/irregular/test.pb.go @@ -266,7 +266,7 @@ func file_internal_testprotos_irregular_test_proto_rawDescGZIP() []byte { } var file_internal_testprotos_irregular_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_internal_testprotos_irregular_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_irregular_test_proto_goTypes = []any{ (*Message)(nil), // 0: goproto.proto.irregular.Message nil, // 1: goproto.proto.irregular.Message.MapMessageEntry nil, // 2: goproto.proto.irregular.Message.MapAberrantMessageEntry @@ -300,7 +300,7 @@ func file_internal_testprotos_irregular_test_proto_init() { } file_internal_testprotos_irregular_irregular_proto_init() if !protoimpl.UnsafeEnabled { - file_internal_testprotos_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_irregular_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -313,7 +313,7 @@ func file_internal_testprotos_irregular_test_proto_init() { } } } - file_internal_testprotos_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_irregular_test_proto_msgTypes[0].OneofWrappers = []any{ (*Message_OneofMessage)(nil), (*Message_OneofAberrantMessage)(nil), } diff --git a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go index e2da386bc..3567c378e 100644 --- a/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go +++ b/internal/testprotos/lazy/lazy_extension_normalized_wire_test.pb.go @@ -238,7 +238,7 @@ func file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_raw } var file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_goTypes = []any{ (*Sub)(nil), // 0: lazy_extension_normalized_wire_test.Sub (*Top)(nil), // 1: lazy_extension_normalized_wire_test.Top (*Ext)(nil), // 2: lazy_extension_normalized_wire_test.Ext @@ -261,7 +261,7 @@ func file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_ini return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Sub); i { case 0: return &v.state @@ -275,7 +275,7 @@ func file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_ini return nil } } - file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Top); i { case 0: return &v.state @@ -287,7 +287,7 @@ func file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_ini return nil } } - file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Ext); i { case 0: return &v.state diff --git a/internal/testprotos/lazy/lazy_extension_test.pb.go b/internal/testprotos/lazy/lazy_extension_test.pb.go index 889e679a4..815e95fa2 100644 --- a/internal/testprotos/lazy/lazy_extension_test.pb.go +++ b/internal/testprotos/lazy/lazy_extension_test.pb.go @@ -704,7 +704,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_rawDescGZIP() []byt var file_internal_testprotos_lazy_lazy_extension_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_internal_testprotos_lazy_lazy_extension_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_lazy_lazy_extension_test_proto_goTypes = []any{ (FlyingFoxSpecies)(0), // 0: lazy_extension_test.FlyingFoxSpecies (PipistrelleSpecies)(0), // 1: lazy_extension_test.PipistrelleSpecies (*Holder)(nil), // 2: lazy_extension_test.Holder @@ -750,7 +750,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Holder); i { case 0: return &v.state @@ -762,7 +762,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Rabbit); i { case 0: return &v.state @@ -774,7 +774,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*FlyingFox); i { case 0: return &v.state @@ -786,7 +786,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Tree); i { case 0: return &v.state @@ -800,7 +800,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Pipistrelle); i { case 0: return &v.state @@ -812,7 +812,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Pipistrelles); i { case 0: return &v.state @@ -824,7 +824,7 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() { return nil } } - file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_lazy_lazy_extension_test_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BatNest); i { case 0: return &v.state diff --git a/internal/testprotos/legacy/legacy.pb.go b/internal/testprotos/legacy/legacy.pb.go index d486d3b7c..460fc3d90 100644 --- a/internal/testprotos/legacy/legacy.pb.go +++ b/internal/testprotos/legacy/legacy.pb.go @@ -281,7 +281,7 @@ func file_internal_testprotos_legacy_legacy_proto_rawDescGZIP() []byte { } var file_internal_testprotos_legacy_legacy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_legacy_legacy_proto_goTypes = []interface{}{ +var file_internal_testprotos_legacy_legacy_proto_goTypes = []any{ (*Legacy)(nil), // 0: google.golang.org.Legacy (*proto2_20160225_2fc053c5.Message)(nil), // 1: google.golang.org.proto2_20160225.Message (*proto3_20160225_2fc053c5.Message)(nil), // 2: google.golang.org.proto3_20160225.Message @@ -322,7 +322,7 @@ func file_internal_testprotos_legacy_legacy_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_legacy_legacy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_legacy_legacy_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Legacy); i { case 0: return &v.state diff --git a/internal/testprotos/messageset/messagesetpb/message_set.pb.go b/internal/testprotos/messageset/messagesetpb/message_set.pb.go index 2769be53b..0adbb65dc 100644 --- a/internal/testprotos/messageset/messagesetpb/message_set.pb.go +++ b/internal/testprotos/messageset/messagesetpb/message_set.pb.go @@ -136,7 +136,7 @@ func file_internal_testprotos_messageset_messagesetpb_message_set_proto_rawDescG } var file_internal_testprotos_messageset_messagesetpb_message_set_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_internal_testprotos_messageset_messagesetpb_message_set_proto_goTypes = []interface{}{ +var file_internal_testprotos_messageset_messagesetpb_message_set_proto_goTypes = []any{ (*MessageSet)(nil), // 0: goproto.proto.messageset.MessageSet (*MessageSetContainer)(nil), // 1: goproto.proto.messageset.MessageSetContainer } @@ -155,7 +155,7 @@ func file_internal_testprotos_messageset_messagesetpb_message_set_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_messageset_messagesetpb_message_set_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_messagesetpb_message_set_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MessageSet); i { case 0: return &v.state @@ -169,7 +169,7 @@ func file_internal_testprotos_messageset_messagesetpb_message_set_proto_init() { return nil } } - file_internal_testprotos_messageset_messagesetpb_message_set_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_messagesetpb_message_set_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*MessageSetContainer); i { case 0: return &v.state diff --git a/internal/testprotos/messageset/msetextpb/msetextpb.pb.go b/internal/testprotos/messageset/msetextpb/msetextpb.pb.go index c9d202593..11b368f49 100644 --- a/internal/testprotos/messageset/msetextpb/msetextpb.pb.go +++ b/internal/testprotos/messageset/msetextpb/msetextpb.pb.go @@ -325,7 +325,7 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_rawDescGZIP() } var file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_internal_testprotos_messageset_msetextpb_msetextpb_proto_goTypes = []interface{}{ +var file_internal_testprotos_messageset_msetextpb_msetextpb_proto_goTypes = []any{ (*Ext1)(nil), // 0: goproto.proto.messageset.Ext1 (*Ext2)(nil), // 1: goproto.proto.messageset.Ext2 (*ExtRequired)(nil), // 2: goproto.proto.messageset.ExtRequired @@ -354,7 +354,7 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Ext1); i { case 0: return &v.state @@ -366,7 +366,7 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_init() { return nil } } - file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Ext2); i { case 0: return &v.state @@ -378,7 +378,7 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_init() { return nil } } - file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ExtRequired); i { case 0: return &v.state @@ -390,7 +390,7 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_init() { return nil } } - file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_messageset_msetextpb_msetextpb_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExtLargeNumber); i { case 0: return &v.state diff --git a/internal/testprotos/news/news.pb.go b/internal/testprotos/news/news.pb.go index bb728a69a..022b89a31 100644 --- a/internal/testprotos/news/news.pb.go +++ b/internal/testprotos/news/news.pb.go @@ -335,7 +335,7 @@ func file_internal_testprotos_news_news_proto_rawDescGZIP() []byte { var file_internal_testprotos_news_news_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_internal_testprotos_news_news_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_internal_testprotos_news_news_proto_goTypes = []interface{}{ +var file_internal_testprotos_news_news_proto_goTypes = []any{ (Article_Status)(0), // 0: google.golang.org.Article.Status (*Article)(nil), // 1: google.golang.org.Article (*BinaryAttachment)(nil), // 2: google.golang.org.BinaryAttachment @@ -362,7 +362,7 @@ func file_internal_testprotos_news_news_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_news_news_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_news_news_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Article); i { case 0: return &v.state @@ -374,7 +374,7 @@ func file_internal_testprotos_news_news_proto_init() { return nil } } - file_internal_testprotos_news_news_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_news_news_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*BinaryAttachment); i { case 0: return &v.state @@ -386,7 +386,7 @@ func file_internal_testprotos_news_news_proto_init() { return nil } } - file_internal_testprotos_news_news_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_news_news_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*KeyValueAttachment); i { case 0: return &v.state diff --git a/internal/testprotos/nullable/nullable.go b/internal/testprotos/nullable/nullable.go index 34664551a..50f9310e5 100644 --- a/internal/testprotos/nullable/nullable.go +++ b/internal/testprotos/nullable/nullable.go @@ -54,8 +54,8 @@ type Proto2 struct { func (x *Proto2) ProtoMessage() {} func (x *Proto2) Reset() { *x = Proto2{} } func (x *Proto2) String() string { return prototext.Format(protoimpl.X.ProtoMessageV2Of(x)) } -func (x *Proto2) XXX_OneofWrappers() []interface{} { - return []interface{}{ +func (x *Proto2) XXX_OneofWrappers() []any { + return []any{ (*Proto2_OneofBool)(nil), (*Proto2_OneofInt32)(nil), (*Proto2_OneofInt64)(nil), @@ -161,8 +161,8 @@ type Proto3 struct { func (x *Proto3) ProtoMessage() {} func (x *Proto3) Reset() { *x = Proto3{} } func (x *Proto3) String() string { return prototext.Format(protoimpl.X.ProtoMessageV2Of(x)) } -func (x *Proto3) XXX_OneofWrappers() []interface{} { - return []interface{}{ +func (x *Proto3) XXX_OneofWrappers() []any { + return []any{ (*Proto3_OneofBool)(nil), (*Proto3_OneofInt32)(nil), (*Proto3_OneofInt64)(nil), diff --git a/internal/testprotos/order/order.pb.go b/internal/testprotos/order/order.pb.go index b62ef9519..c3bb01309 100644 --- a/internal/testprotos/order/order.pb.go +++ b/internal/testprotos/order/order.pb.go @@ -190,7 +190,7 @@ func file_internal_testprotos_order_order_proto_rawDescGZIP() []byte { } var file_internal_testprotos_order_order_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_order_order_proto_goTypes = []interface{}{ +var file_internal_testprotos_order_order_proto_goTypes = []any{ (*Message)(nil), // 0: goproto.proto.order.Message } var file_internal_testprotos_order_order_proto_depIdxs = []int32{ @@ -210,7 +210,7 @@ func file_internal_testprotos_order_order_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_order_order_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_order_order_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -225,7 +225,7 @@ func file_internal_testprotos_order_order_proto_init() { } } } - file_internal_testprotos_order_order_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_order_order_proto_msgTypes[0].OneofWrappers = []any{ (*Message_Field_10)(nil), } type x struct{} diff --git a/internal/testprotos/race/extender/test.pb.go b/internal/testprotos/race/extender/test.pb.go index 508d114e0..68253a584 100644 --- a/internal/testprotos/race/extender/test.pb.go +++ b/internal/testprotos/race/extender/test.pb.go @@ -114,7 +114,7 @@ func file_internal_testprotos_race_extender_test_proto_rawDescGZIP() []byte { } var file_internal_testprotos_race_extender_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_race_extender_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_race_extender_test_proto_goTypes = []any{ (*OtherMessage)(nil), // 0: goproto.proto.test.OtherMessage (*message.MyMessage)(nil), // 1: goproto.proto.test.MyMessage } @@ -133,7 +133,7 @@ func file_internal_testprotos_race_extender_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_race_extender_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_race_extender_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*OtherMessage); i { case 0: return &v.state diff --git a/internal/testprotos/race/message/test.pb.go b/internal/testprotos/race/message/test.pb.go index 46731afbd..a73092399 100644 --- a/internal/testprotos/race/message/test.pb.go +++ b/internal/testprotos/race/message/test.pb.go @@ -92,7 +92,7 @@ func file_internal_testprotos_race_message_test_proto_rawDescGZIP() []byte { } var file_internal_testprotos_race_message_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_race_message_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_race_message_test_proto_goTypes = []any{ (*MyMessage)(nil), // 0: goproto.proto.test.MyMessage } var file_internal_testprotos_race_message_test_proto_depIdxs = []int32{ @@ -109,7 +109,7 @@ func file_internal_testprotos_race_message_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_race_message_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_race_message_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*MyMessage); i { case 0: return &v.state diff --git a/internal/testprotos/registry/test.pb.go b/internal/testprotos/registry/test.pb.go index c2613c701..d39ae18b5 100644 --- a/internal/testprotos/registry/test.pb.go +++ b/internal/testprotos/registry/test.pb.go @@ -466,7 +466,7 @@ func file_internal_testprotos_registry_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_registry_test_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_internal_testprotos_registry_test_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_internal_testprotos_registry_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_registry_test_proto_goTypes = []any{ (Enum1)(0), // 0: testprotos.Enum1 (Enum2)(0), // 1: testprotos.Enum2 (Enum3)(0), // 2: testprotos.Enum3 @@ -499,7 +499,7 @@ func file_internal_testprotos_registry_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_registry_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_registry_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Message1); i { case 0: return &v.state @@ -513,7 +513,7 @@ func file_internal_testprotos_registry_test_proto_init() { return nil } } - file_internal_testprotos_registry_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_registry_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Message2); i { case 0: return &v.state @@ -525,7 +525,7 @@ func file_internal_testprotos_registry_test_proto_init() { return nil } } - file_internal_testprotos_registry_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_registry_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Message3); i { case 0: return &v.state @@ -537,7 +537,7 @@ func file_internal_testprotos_registry_test_proto_init() { return nil } } - file_internal_testprotos_registry_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_registry_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Message4); i { case 0: return &v.state diff --git a/internal/testprotos/required/required.pb.go b/internal/testprotos/required/required.pb.go index 065fcbf5e..553e4cae7 100644 --- a/internal/testprotos/required/required.pb.go +++ b/internal/testprotos/required/required.pb.go @@ -860,7 +860,7 @@ func file_internal_testprotos_required_required_proto_rawDescGZIP() []byte { } var file_internal_testprotos_required_required_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_internal_testprotos_required_required_proto_goTypes = []interface{}{ +var file_internal_testprotos_required_required_proto_goTypes = []any{ (*Int32)(nil), // 0: goproto.proto.testrequired.Int32 (*Int64)(nil), // 1: goproto.proto.testrequired.Int64 (*Uint32)(nil), // 2: goproto.proto.testrequired.Uint32 @@ -895,7 +895,7 @@ func file_internal_testprotos_required_required_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_required_required_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Int32); i { case 0: return &v.state @@ -907,7 +907,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Int64); i { case 0: return &v.state @@ -919,7 +919,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Uint32); i { case 0: return &v.state @@ -931,7 +931,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Uint64); i { case 0: return &v.state @@ -943,7 +943,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Sint32); i { case 0: return &v.state @@ -955,7 +955,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Sint64); i { case 0: return &v.state @@ -967,7 +967,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Fixed32); i { case 0: return &v.state @@ -979,7 +979,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Fixed64); i { case 0: return &v.state @@ -991,7 +991,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Float); i { case 0: return &v.state @@ -1003,7 +1003,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Double); i { case 0: return &v.state @@ -1015,7 +1015,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Bool); i { case 0: return &v.state @@ -1027,7 +1027,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*String); i { case 0: return &v.state @@ -1039,7 +1039,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*Bytes); i { case 0: return &v.state @@ -1051,7 +1051,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*Message); i { case 0: return &v.state @@ -1063,7 +1063,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*Group); i { case 0: return &v.state @@ -1075,7 +1075,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*Message_M); i { case 0: return &v.state @@ -1087,7 +1087,7 @@ func file_internal_testprotos_required_required_proto_init() { return nil } } - file_internal_testprotos_required_required_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_required_required_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*Group_Group); i { case 0: return &v.state diff --git a/internal/testprotos/test/ext.pb.go b/internal/testprotos/test/ext.pb.go index 194b4c527..8c26df569 100644 --- a/internal/testprotos/test/ext.pb.go +++ b/internal/testprotos/test/ext.pb.go @@ -51,7 +51,7 @@ var file_internal_testprotos_test_ext_proto_rawDesc = []byte{ 0x74, 0x65, 0x73, 0x74, } -var file_internal_testprotos_test_ext_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_ext_proto_goTypes = []any{ (*TestAllExtensions)(nil), // 0: goproto.proto.test.TestAllExtensions } var file_internal_testprotos_test_ext_proto_depIdxs = []int32{ diff --git a/internal/testprotos/test/test.pb.go b/internal/testprotos/test/test.pb.go index af38ddb4f..1da5ff1f1 100644 --- a/internal/testprotos/test/test.pb.go +++ b/internal/testprotos/test/test.pb.go @@ -4809,7 +4809,7 @@ func file_internal_testprotos_test_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_test_test_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_internal_testprotos_test_test_proto_msgTypes = make([]protoimpl.MessageInfo, 45) -var file_internal_testprotos_test_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_test_proto_goTypes = []any{ (ForeignEnum)(0), // 0: goproto.proto.test.ForeignEnum (TestReservedEnumFields)(0), // 1: goproto.proto.test.TestReservedEnumFields (TestAllTypes_NestedEnum)(0), // 2: goproto.proto.test.TestAllTypes.NestedEnum @@ -5038,7 +5038,7 @@ func file_internal_testprotos_test_test_proto_init() { file_internal_testprotos_test_test_public_proto_init() file_internal_testprotos_test_test_import_proto_init() if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes); i { case 0: return &v.state @@ -5050,7 +5050,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*TestDeprecatedMessage); i { case 0: return &v.state @@ -5062,7 +5062,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessage); i { case 0: return &v.state @@ -5074,7 +5074,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestReservedFields); i { case 0: return &v.state @@ -5086,7 +5086,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TestAllExtensions); i { case 0: return &v.state @@ -5100,7 +5100,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*OptionalGroup); i { case 0: return &v.state @@ -5112,7 +5112,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*RepeatedGroup); i { case 0: return &v.state @@ -5124,7 +5124,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*TestNestedExtension); i { case 0: return &v.state @@ -5136,7 +5136,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TestRequired); i { case 0: return &v.state @@ -5148,7 +5148,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredForeign); i { case 0: return &v.state @@ -5160,7 +5160,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields); i { case 0: return &v.state @@ -5172,7 +5172,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*TestWeak); i { case 0: return &v.state @@ -5186,7 +5186,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*TestPackedTypes); i { case 0: return &v.state @@ -5198,7 +5198,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*TestUnpackedTypes); i { case 0: return &v.state @@ -5210,7 +5210,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*TestPackedExtensions); i { case 0: return &v.state @@ -5224,7 +5224,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*TestUnpackedExtensions); i { case 0: return &v.state @@ -5238,7 +5238,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*FooRequest); i { case 0: return &v.state @@ -5250,7 +5250,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*FooResponse); i { case 0: return &v.state @@ -5262,7 +5262,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*WeirdDefault); i { case 0: return &v.state @@ -5274,7 +5274,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*RemoteDefault); i { case 0: return &v.state @@ -5286,7 +5286,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_NestedMessage); i { case 0: return &v.state @@ -5298,7 +5298,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_OptionalGroup); i { case 0: return &v.state @@ -5310,7 +5310,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_RepeatedGroup); i { case 0: return &v.state @@ -5322,7 +5322,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[40].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_OneofGroup); i { case 0: return &v.state @@ -5334,7 +5334,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[41].Exporter = func(v any, i int) any { switch v := v.(*TestAllExtensions_NestedMessage); i { case 0: return &v.state @@ -5346,7 +5346,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[43].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields_OptionalGroup); i { case 0: return &v.state @@ -5358,7 +5358,7 @@ func file_internal_testprotos_test_test_proto_init() { return nil } } - file_internal_testprotos_test_test_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_proto_msgTypes[44].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields_RepeatedGroup); i { case 0: return &v.state @@ -5371,7 +5371,7 @@ func file_internal_testprotos_test_test_proto_init() { } } } - file_internal_testprotos_test_test_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_test_test_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypes_OneofUint32)(nil), (*TestAllTypes_OneofNestedMessage)(nil), (*TestAllTypes_OneofString)(nil), @@ -5384,10 +5384,10 @@ func file_internal_testprotos_test_test_proto_init() { (*TestAllTypes_Oneofgroup)(nil), (*TestAllTypes_OneofOptionalUint32)(nil), } - file_internal_testprotos_test_test_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_internal_testprotos_test_test_proto_msgTypes[1].OneofWrappers = []any{ (*TestDeprecatedMessage_DeprecatedOneofField)(nil), } - file_internal_testprotos_test_test_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_internal_testprotos_test_test_proto_msgTypes[9].OneofWrappers = []any{ (*TestRequiredForeign_OneofMessage)(nil), } type x struct{} diff --git a/internal/testprotos/test/test_import.pb.go b/internal/testprotos/test/test_import.pb.go index 6be93bdf9..cd05c33a3 100644 --- a/internal/testprotos/test/test_import.pb.go +++ b/internal/testprotos/test/test_import.pb.go @@ -135,7 +135,7 @@ func file_internal_testprotos_test_test_import_proto_rawDescGZIP() []byte { var file_internal_testprotos_test_test_import_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_internal_testprotos_test_test_import_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_test_test_import_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_test_import_proto_goTypes = []any{ (ImportEnum)(0), // 0: goproto.proto.test.ImportEnum (*ImportMessage)(nil), // 1: goproto.proto.test.ImportMessage } @@ -153,7 +153,7 @@ func file_internal_testprotos_test_test_import_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test_test_import_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_import_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ImportMessage); i { case 0: return &v.state diff --git a/internal/testprotos/test/test_public.pb.go b/internal/testprotos/test/test_public.pb.go index 19797ea1a..70e2247dc 100644 --- a/internal/testprotos/test/test_public.pb.go +++ b/internal/testprotos/test/test_public.pb.go @@ -79,7 +79,7 @@ func file_internal_testprotos_test_test_public_proto_rawDescGZIP() []byte { } var file_internal_testprotos_test_test_public_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_test_test_public_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_test_public_proto_goTypes = []any{ (*PublicImportMessage)(nil), // 0: goproto.proto.test.PublicImportMessage } var file_internal_testprotos_test_test_public_proto_depIdxs = []int32{ @@ -96,7 +96,7 @@ func file_internal_testprotos_test_test_public_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test_test_public_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_test_public_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*PublicImportMessage); i { case 0: return &v.state diff --git a/internal/testprotos/test/weak1/test_weak.pb.go b/internal/testprotos/test/weak1/test_weak.pb.go index 63203c529..c1030c2d4 100644 --- a/internal/testprotos/test/weak1/test_weak.pb.go +++ b/internal/testprotos/test/weak1/test_weak.pb.go @@ -90,7 +90,7 @@ func file_internal_testprotos_test_weak1_test_weak_proto_rawDescGZIP() []byte { } var file_internal_testprotos_test_weak1_test_weak_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_test_weak1_test_weak_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_weak1_test_weak_proto_goTypes = []any{ (*WeakImportMessage1)(nil), // 0: goproto.proto.test.weak.WeakImportMessage1 } var file_internal_testprotos_test_weak1_test_weak_proto_depIdxs = []int32{ @@ -107,7 +107,7 @@ func file_internal_testprotos_test_weak1_test_weak_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test_weak1_test_weak_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_weak1_test_weak_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*WeakImportMessage1); i { case 0: return &v.state diff --git a/internal/testprotos/test/weak2/test_weak.pb.go b/internal/testprotos/test/weak2/test_weak.pb.go index 7678dc9ae..dcf0c68bd 100644 --- a/internal/testprotos/test/weak2/test_weak.pb.go +++ b/internal/testprotos/test/weak2/test_weak.pb.go @@ -90,7 +90,7 @@ func file_internal_testprotos_test_weak2_test_weak_proto_rawDescGZIP() []byte { } var file_internal_testprotos_test_weak2_test_weak_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_test_weak2_test_weak_proto_goTypes = []interface{}{ +var file_internal_testprotos_test_weak2_test_weak_proto_goTypes = []any{ (*WeakImportMessage2)(nil), // 0: goproto.proto.test.weak.WeakImportMessage2 } var file_internal_testprotos_test_weak2_test_weak_proto_depIdxs = []int32{ @@ -107,7 +107,7 @@ func file_internal_testprotos_test_weak2_test_weak_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test_weak2_test_weak_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test_weak2_test_weak_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*WeakImportMessage2); i { case 0: return &v.state diff --git a/internal/testprotos/test3/test.pb.go b/internal/testprotos/test3/test.pb.go index d2ff0bf28..acae4661c 100644 --- a/internal/testprotos/test3/test.pb.go +++ b/internal/testprotos/test3/test.pb.go @@ -1566,7 +1566,7 @@ func file_internal_testprotos_test3_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_test3_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_test3_test_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_internal_testprotos_test3_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_test3_test_proto_goTypes = []any{ (ForeignEnum)(0), // 0: goproto.proto.test3.ForeignEnum (TestAllTypes_NestedEnum)(0), // 1: goproto.proto.test3.TestAllTypes.NestedEnum (*TestAllTypes)(nil), // 2: goproto.proto.test3.TestAllTypes @@ -1647,7 +1647,7 @@ func file_internal_testprotos_test3_test_proto_init() { } file_internal_testprotos_test3_test_import_proto_init() if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test3_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test3_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes); i { case 0: return &v.state @@ -1659,7 +1659,7 @@ func file_internal_testprotos_test3_test_proto_init() { return nil } } - file_internal_testprotos_test3_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test3_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessage); i { case 0: return &v.state @@ -1671,7 +1671,7 @@ func file_internal_testprotos_test3_test_proto_init() { return nil } } - file_internal_testprotos_test3_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test3_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_NestedMessage); i { case 0: return &v.state @@ -1684,7 +1684,7 @@ func file_internal_testprotos_test3_test_proto_init() { } } } - file_internal_testprotos_test3_test_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_test3_test_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypes_OneofUint32)(nil), (*TestAllTypes_OneofNestedMessage)(nil), (*TestAllTypes_OneofString)(nil), diff --git a/internal/testprotos/test3/test_extension.pb.go b/internal/testprotos/test3/test_extension.pb.go index b48d10197..0ababf73a 100644 --- a/internal/testprotos/test3/test_extension.pb.go +++ b/internal/testprotos/test3/test_extension.pb.go @@ -851,7 +851,7 @@ var file_internal_testprotos_test3_test_extension_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x33, } -var file_internal_testprotos_test3_test_extension_proto_goTypes = []interface{}{ +var file_internal_testprotos_test3_test_extension_proto_goTypes = []any{ (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions (*ForeignMessage)(nil), // 1: goproto.proto.test3.ForeignMessage (ForeignEnum)(0), // 2: goproto.proto.test3.ForeignEnum diff --git a/internal/testprotos/test3/test_import.pb.go b/internal/testprotos/test3/test_import.pb.go index 5fc60438b..d11af879c 100644 --- a/internal/testprotos/test3/test_import.pb.go +++ b/internal/testprotos/test3/test_import.pb.go @@ -126,7 +126,7 @@ func file_internal_testprotos_test3_test_import_proto_rawDescGZIP() []byte { var file_internal_testprotos_test3_test_import_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_internal_testprotos_test3_test_import_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_test3_test_import_proto_goTypes = []interface{}{ +var file_internal_testprotos_test3_test_import_proto_goTypes = []any{ (ImportEnum)(0), // 0: goproto.proto.test3.ImportEnum (*ImportMessage)(nil), // 1: goproto.proto.test3.ImportMessage } @@ -144,7 +144,7 @@ func file_internal_testprotos_test3_test_import_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_test3_test_import_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_test3_test_import_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ImportMessage); i { case 0: return &v.state diff --git a/internal/testprotos/testeditions/test.pb.go b/internal/testprotos/testeditions/test.pb.go index d16159eb4..bce0bb8d0 100644 --- a/internal/testprotos/testeditions/test.pb.go +++ b/internal/testprotos/testeditions/test.pb.go @@ -2733,7 +2733,7 @@ func file_internal_testprotos_testeditions_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_testeditions_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_testeditions_test_proto_msgTypes = make([]protoimpl.MessageInfo, 31) -var file_internal_testprotos_testeditions_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_testeditions_test_proto_goTypes = []any{ (ForeignEnum)(0), // 0: goproto.proto.testeditions.ForeignEnum (TestAllTypes_NestedEnum)(0), // 1: goproto.proto.testeditions.TestAllTypes.NestedEnum (*TestAllTypes)(nil), // 2: goproto.proto.testeditions.TestAllTypes @@ -2843,7 +2843,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_testeditions_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes); i { case 0: return &v.state @@ -2855,7 +2855,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ForeignMessage); i { case 0: return &v.state @@ -2867,7 +2867,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TestRequired); i { case 0: return &v.state @@ -2879,7 +2879,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredForeign); i { case 0: return &v.state @@ -2891,7 +2891,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields); i { case 0: return &v.state @@ -2903,7 +2903,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TestPackedTypes); i { case 0: return &v.state @@ -2915,7 +2915,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*TestPackedExtensions); i { case 0: return &v.state @@ -2929,7 +2929,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_NestedMessage); i { case 0: return &v.state @@ -2941,7 +2941,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_OptionalGroup); i { case 0: return &v.state @@ -2953,7 +2953,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_RepeatedGroup); i { case 0: return &v.state @@ -2965,7 +2965,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*TestAllTypes_OneofGroup); i { case 0: return &v.state @@ -2977,7 +2977,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields_OptionalGroup); i { case 0: return &v.state @@ -2989,7 +2989,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*TestRequiredGroupFields_RepeatedGroup); i { case 0: return &v.state @@ -3002,7 +3002,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { } } } - file_internal_testprotos_testeditions_test_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_internal_testprotos_testeditions_test_proto_msgTypes[0].OneofWrappers = []any{ (*TestAllTypes_OneofUint32)(nil), (*TestAllTypes_OneofNestedMessage)(nil), (*TestAllTypes_OneofString)(nil), @@ -3015,7 +3015,7 @@ func file_internal_testprotos_testeditions_test_proto_init() { (*TestAllTypes_Oneofgroup)(nil), (*TestAllTypes_OneofOptionalUint32)(nil), } - file_internal_testprotos_testeditions_test_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_internal_testprotos_testeditions_test_proto_msgTypes[3].OneofWrappers = []any{ (*TestRequiredForeign_OneofMessage)(nil), } type x struct{} diff --git a/internal/testprotos/testeditions/test_extension.pb.go b/internal/testprotos/testeditions/test_extension.pb.go index 9775c8f34..2d7cb1458 100644 --- a/internal/testprotos/testeditions/test_extension.pb.go +++ b/internal/testprotos/testeditions/test_extension.pb.go @@ -1302,7 +1302,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_rawDescGZIP() [] } var file_internal_testprotos_testeditions_test_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_internal_testprotos_testeditions_test_extension_proto_goTypes = []interface{}{ +var file_internal_testprotos_testeditions_test_extension_proto_goTypes = []any{ (*TestAllExtensions)(nil), // 0: goproto.proto.testeditions.TestAllExtensions (*OptionalGroup)(nil), // 1: goproto.proto.testeditions.OptionalGroup (*RepeatedGroup)(nil), // 2: goproto.proto.testeditions.RepeatedGroup @@ -1395,7 +1395,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { } file_internal_testprotos_testeditions_test_proto_init() if !protoimpl.UnsafeEnabled { - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TestAllExtensions); i { case 0: return &v.state @@ -1409,7 +1409,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*OptionalGroup); i { case 0: return &v.state @@ -1421,7 +1421,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RepeatedGroup); i { case 0: return &v.state @@ -1433,7 +1433,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*TestFeatureResolution); i { case 0: return &v.state @@ -1447,7 +1447,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*RepeatedFieldEncoding); i { case 0: return &v.state @@ -1459,7 +1459,7 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() { return nil } } - file_internal_testprotos_testeditions_test_extension_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*TestAllExtensions_NestedMessage); i { case 0: return &v.state diff --git a/internal/testprotos/testeditions/test_extension2.pb.go b/internal/testprotos/testeditions/test_extension2.pb.go index b089f9980..3bce501ec 100644 --- a/internal/testprotos/testeditions/test_extension2.pb.go +++ b/internal/testprotos/testeditions/test_extension2.pb.go @@ -169,7 +169,7 @@ func file_internal_testprotos_testeditions_test_extension2_proto_rawDescGZIP() [ } var file_internal_testprotos_testeditions_test_extension2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_testprotos_testeditions_test_extension2_proto_goTypes = []interface{}{ +var file_internal_testprotos_testeditions_test_extension2_proto_goTypes = []any{ (*OtherRepeatedFieldEncoding)(nil), // 0: goproto.proto.testeditions.OtherRepeatedFieldEncoding (*TestFeatureResolution)(nil), // 1: goproto.proto.testeditions.TestFeatureResolution } @@ -192,7 +192,7 @@ func file_internal_testprotos_testeditions_test_extension2_proto_init() { } file_internal_testprotos_testeditions_test_extension_proto_init() if !protoimpl.UnsafeEnabled { - file_internal_testprotos_testeditions_test_extension2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_testeditions_test_extension2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*OtherRepeatedFieldEncoding); i { case 0: return &v.state diff --git a/internal/testprotos/textpb2/test.pb.go b/internal/testprotos/textpb2/test.pb.go index 835ceafef..cbc85f509 100644 --- a/internal/testprotos/textpb2/test.pb.go +++ b/internal/testprotos/textpb2/test.pb.go @@ -2169,7 +2169,7 @@ func file_internal_testprotos_textpb2_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_textpb2_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_textpb2_test_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_internal_testprotos_textpb2_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_textpb2_test_proto_goTypes = []any{ (Enum)(0), // 0: pb2.Enum (Enums_NestedEnum)(0), // 1: pb2.Enums.NestedEnum (*Scalars)(nil), // 2: pb2.Scalars @@ -2303,7 +2303,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_textpb2_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Scalars); i { case 0: return &v.state @@ -2315,7 +2315,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Enums); i { case 0: return &v.state @@ -2327,7 +2327,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Repeats); i { case 0: return &v.state @@ -2339,7 +2339,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Maps); i { case 0: return &v.state @@ -2351,7 +2351,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Nested); i { case 0: return &v.state @@ -2363,7 +2363,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Nests); i { case 0: return &v.state @@ -2375,7 +2375,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Requireds); i { case 0: return &v.state @@ -2387,7 +2387,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*PartialRequired); i { case 0: return &v.state @@ -2399,7 +2399,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*NestedWithRequired); i { case 0: return &v.state @@ -2411,7 +2411,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*IndirectRequired); i { case 0: return &v.state @@ -2423,7 +2423,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*Extensions); i { case 0: return &v.state @@ -2437,7 +2437,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ExtensionsContainer); i { case 0: return &v.state @@ -2449,7 +2449,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*MessageSet); i { case 0: return &v.state @@ -2463,7 +2463,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*MessageSetExtension); i { case 0: return &v.state @@ -2475,7 +2475,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*FakeMessageSet); i { case 0: return &v.state @@ -2489,7 +2489,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*FakeMessageSetExtension); i { case 0: return &v.state @@ -2501,7 +2501,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*KnownTypes); i { case 0: return &v.state @@ -2513,7 +2513,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*Nests_OptGroup); i { case 0: return &v.state @@ -2525,7 +2525,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*Nests_RptGroup); i { case 0: return &v.state @@ -2537,7 +2537,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { return nil } } - file_internal_testprotos_textpb2_test_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb2_test_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*Nests_OptGroup_OptNestedGroup); i { case 0: return &v.state @@ -2550,7 +2550,7 @@ func file_internal_testprotos_textpb2_test_proto_init() { } } } - file_internal_testprotos_textpb2_test_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_internal_testprotos_textpb2_test_proto_msgTypes[9].OneofWrappers = []any{ (*IndirectRequired_OneofNested)(nil), } type x struct{} diff --git a/internal/testprotos/textpb3/test.pb.go b/internal/testprotos/textpb3/test.pb.go index be8034c5b..d595274ef 100644 --- a/internal/testprotos/textpb3/test.pb.go +++ b/internal/testprotos/textpb3/test.pb.go @@ -1085,7 +1085,7 @@ func file_internal_testprotos_textpb3_test_proto_rawDescGZIP() []byte { var file_internal_testprotos_textpb3_test_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_internal_testprotos_textpb3_test_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_internal_testprotos_textpb3_test_proto_goTypes = []interface{}{ +var file_internal_testprotos_textpb3_test_proto_goTypes = []any{ (Enum)(0), // 0: pb3.Enum (Enums_NestedEnum)(0), // 1: pb3.Enums.NestedEnum (*Scalars)(nil), // 2: pb3.Scalars @@ -1133,7 +1133,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_textpb3_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Scalars); i { case 0: return &v.state @@ -1145,7 +1145,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Repeats); i { case 0: return &v.state @@ -1157,7 +1157,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Proto3Optional); i { case 0: return &v.state @@ -1169,7 +1169,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*Enums); i { case 0: return &v.state @@ -1181,7 +1181,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Nests); i { case 0: return &v.state @@ -1193,7 +1193,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Nested); i { case 0: return &v.state @@ -1205,7 +1205,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Oneofs); i { case 0: return &v.state @@ -1217,7 +1217,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Maps); i { case 0: return &v.state @@ -1229,7 +1229,7 @@ func file_internal_testprotos_textpb3_test_proto_init() { return nil } } - file_internal_testprotos_textpb3_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpb3_test_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*JSONNames); i { case 0: return &v.state @@ -1242,8 +1242,8 @@ func file_internal_testprotos_textpb3_test_proto_init() { } } } - file_internal_testprotos_textpb3_test_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_internal_testprotos_textpb3_test_proto_msgTypes[6].OneofWrappers = []interface{}{ + file_internal_testprotos_textpb3_test_proto_msgTypes[2].OneofWrappers = []any{} + file_internal_testprotos_textpb3_test_proto_msgTypes[6].OneofWrappers = []any{ (*Oneofs_OneofEnum)(nil), (*Oneofs_OneofString)(nil), (*Oneofs_OneofNested)(nil), diff --git a/internal/testprotos/textpbeditions/test2.pb.go b/internal/testprotos/textpbeditions/test2.pb.go index af765c53d..f1a4697ba 100644 --- a/internal/testprotos/textpbeditions/test2.pb.go +++ b/internal/testprotos/textpbeditions/test2.pb.go @@ -2644,7 +2644,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_rawDescGZIP() []byte { var file_internal_testprotos_textpbeditions_test2_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_internal_testprotos_textpbeditions_test2_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_internal_testprotos_textpbeditions_test2_proto_goTypes = []interface{}{ +var file_internal_testprotos_textpbeditions_test2_proto_goTypes = []any{ (Enum)(0), // 0: pbeditions.Enum (OpenEnum)(0), // 1: pbeditions.OpenEnum (Enums_NestedEnum)(0), // 2: pbeditions.Enums.NestedEnum @@ -2788,7 +2788,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Scalars); i { case 0: return &v.state @@ -2800,7 +2800,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ImplicitScalars); i { case 0: return &v.state @@ -2812,7 +2812,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*UTF8Validated); i { case 0: return &v.state @@ -2824,7 +2824,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*NestsUTF8Validated); i { case 0: return &v.state @@ -2836,7 +2836,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Enums); i { case 0: return &v.state @@ -2848,7 +2848,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*Repeats); i { case 0: return &v.state @@ -2860,7 +2860,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*Maps); i { case 0: return &v.state @@ -2872,7 +2872,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*Nested); i { case 0: return &v.state @@ -2884,7 +2884,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*Nests); i { case 0: return &v.state @@ -2896,7 +2896,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*Requireds); i { case 0: return &v.state @@ -2908,7 +2908,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*PartialRequired); i { case 0: return &v.state @@ -2920,7 +2920,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*NestedWithRequired); i { case 0: return &v.state @@ -2932,7 +2932,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*IndirectRequired); i { case 0: return &v.state @@ -2944,7 +2944,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*Extensions); i { case 0: return &v.state @@ -2958,7 +2958,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*ExtensionsContainer); i { case 0: return &v.state @@ -2970,7 +2970,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*MessageSet); i { case 0: return &v.state @@ -2984,7 +2984,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*MessageSetExtension); i { case 0: return &v.state @@ -2996,7 +2996,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*FakeMessageSet); i { case 0: return &v.state @@ -3010,7 +3010,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*FakeMessageSetExtension); i { case 0: return &v.state @@ -3022,7 +3022,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*KnownTypes); i { case 0: return &v.state @@ -3034,7 +3034,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*Nests_OptGroup); i { case 0: return &v.state @@ -3046,7 +3046,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*Nests_RptGroup); i { case 0: return &v.state @@ -3058,7 +3058,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { return nil } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*Nests_OptGroup_OptNestedGroup); i { case 0: return &v.state @@ -3071,7 +3071,7 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() { } } } - file_internal_testprotos_textpbeditions_test2_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_internal_testprotos_textpbeditions_test2_proto_msgTypes[12].OneofWrappers = []any{ (*IndirectRequired_OneofNested)(nil), } type x struct{} diff --git a/proto/decode_test.go b/proto/decode_test.go index d9db9468e..c0a15e2b4 100644 --- a/proto/decode_test.go +++ b/proto/decode_test.go @@ -151,7 +151,7 @@ func unknown(raw protoreflect.RawFields) buildOpt { } } -func extend(desc protoreflect.ExtensionType, value interface{}) buildOpt { +func extend(desc protoreflect.ExtensionType, value any) buildOpt { return func(m proto.Message) { proto.SetExtension(m, desc, value) } diff --git a/proto/extension.go b/proto/extension.go index c9c8721a6..d248f2928 100644 --- a/proto/extension.go +++ b/proto/extension.go @@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. -func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { +func GetExtension(m Message, xt protoreflect.ExtensionType) any { // Treat nil message interface as an empty message; return the default. if m == nil { return xt.InterfaceOf(xt.Zero()) @@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. -func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { +func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) @@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { // It returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current extension field. -func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { +func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) { // Treat nil message interface as an empty message; nothing to range over. if m == nil { return diff --git a/proto/extension_test.go b/proto/extension_test.go index 1a6b7e4e9..6f92c909c 100644 --- a/proto/extension_test.go +++ b/proto/extension_test.go @@ -29,8 +29,8 @@ func TestExtensionFuncs(t *testing.T) { for _, test := range []struct { message proto.Message ext protoreflect.ExtensionType - wantDefault interface{} - value interface{} + wantDefault any + value any }{ { message: &testpb.TestAllExtensions{}, @@ -162,7 +162,7 @@ func TestHasExtensionNoAlloc(t *testing.T) { func TestIsValid(t *testing.T) { tests := []struct { xt protoreflect.ExtensionType - vi interface{} + vi any want bool }{ {testpb.E_OptionalBool, nil, false}, @@ -295,10 +295,10 @@ func TestIsValid(t *testing.T) { func TestExtensionRanger(t *testing.T) { tests := []struct { msg proto.Message - want map[protoreflect.ExtensionType]interface{} + want map[protoreflect.ExtensionType]any }{{ msg: &testpb.TestAllExtensions{}, - want: map[protoreflect.ExtensionType]interface{}{ + want: map[protoreflect.ExtensionType]any{ testpb.E_OptionalInt32: int32(5), testpb.E_OptionalString: string("hello"), testpb.E_OptionalNestedMessage: &testpb.TestAllExtensions_NestedMessage{}, @@ -309,7 +309,7 @@ func TestExtensionRanger(t *testing.T) { }, }, { msg: &testeditionspb.TestAllExtensions{}, - want: map[protoreflect.ExtensionType]interface{}{ + want: map[protoreflect.ExtensionType]any{ testeditionspb.E_OptionalInt32: int32(5), testeditionspb.E_OptionalString: string("hello"), testeditionspb.E_OptionalNestedMessage: &testeditionspb.TestAllExtensions_NestedMessage{}, @@ -320,7 +320,7 @@ func TestExtensionRanger(t *testing.T) { }, }, { msg: &descpb.MessageOptions{}, - want: map[protoreflect.ExtensionType]interface{}{ + want: map[protoreflect.ExtensionType]any{ test3pb.E_OptionalInt32Ext: int32(5), test3pb.E_OptionalStringExt: string("hello"), test3pb.E_OptionalForeignMessageExt: &test3pb.ForeignMessage{}, @@ -338,8 +338,8 @@ func TestExtensionRanger(t *testing.T) { proto.SetExtension(tt.msg, xt, v) } - got := make(map[protoreflect.ExtensionType]interface{}) - proto.RangeExtensions(tt.msg, func(xt protoreflect.ExtensionType, v interface{}) bool { + got := make(map[protoreflect.ExtensionType]any) + proto.RangeExtensions(tt.msg, func(xt protoreflect.ExtensionType, v any) bool { got[xt] = v return true }) diff --git a/proto/nil_test.go b/proto/nil_test.go index 29d259d7d..9bdda1f6a 100644 --- a/proto/nil_test.go +++ b/proto/nil_test.go @@ -20,7 +20,7 @@ import ( func TestNil(t *testing.T) { nilMsg := (*testpb.TestAllExtensions)(nil) extType := testpb.E_OptionalBool - extRanger := func(protoreflect.ExtensionType, interface{}) bool { return true } + extRanger := func(protoreflect.ExtensionType, any) bool { return true } tests := []struct { label string diff --git a/proto/noenforceutf8_test.go b/proto/noenforceutf8_test.go index e4b3ca30d..4e723e078 100644 --- a/proto/noenforceutf8_test.go +++ b/proto/noenforceutf8_test.go @@ -138,7 +138,7 @@ var messageInfo_TestNoEnforceUTF8 = protoimpl.MessageInfo{ } return md }(), - OneofWrappers: []interface{}{ + OneofWrappers: []any{ (*TestNoEnforceUTF8_OneofString)(nil), (*TestNoEnforceUTF8_OneofBytes)(nil), }, diff --git a/reflect/protorange/range_test.go b/reflect/protorange/range_test.go index a8ca6a0b6..678ad1301 100644 --- a/reflect/protorange/range_test.go +++ b/reflect/protorange/range_test.go @@ -29,12 +29,12 @@ func mustMarshal(m proto.Message) []byte { return b } -var transformReflectValue = cmp.Transformer("", func(v protoreflect.Value) interface{} { +var transformReflectValue = cmp.Transformer("", func(v protoreflect.Value) any { switch v := v.Interface().(type) { case protoreflect.Message: return v.Interface() case protoreflect.Map: - ms := map[interface{}]protoreflect.Value{} + ms := map[any]protoreflect.Value{} v.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { ms[k.Interface()] = v return true diff --git a/reflect/protoreflect/type.go b/reflect/protoreflect/type.go index 5b80afe52..cd8fadbaf 100644 --- a/reflect/protoreflect/type.go +++ b/reflect/protoreflect/type.go @@ -510,7 +510,7 @@ type ExtensionType interface { // // ValueOf is more extensive than protoreflect.ValueOf for a given field's // value as it has more type information available. - ValueOf(interface{}) Value + ValueOf(any) Value // InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf panics if the input is nil or does not represent the @@ -519,13 +519,13 @@ type ExtensionType interface { // // InterfaceOf is able to unwrap the Value further than Value.Interface // as it has more type information available. - InterfaceOf(Value) interface{} + InterfaceOf(Value) any // IsValidValue reports whether the Value is valid to assign to the field. IsValidValue(Value) bool // IsValidInterface reports whether the input is valid to assign to the field. - IsValidInterface(interface{}) bool + IsValidInterface(any) bool } // EnumDescriptor describes an enum and diff --git a/reflect/protoreflect/value_pure.go b/reflect/protoreflect/value_pure.go index 7ced876f4..75f83a2af 100644 --- a/reflect/protoreflect/value_pure.go +++ b/reflect/protoreflect/value_pure.go @@ -32,11 +32,11 @@ const ( type value struct { pragma.DoNotCompare // 0B - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface interface{} // 16B + typ valueType // 8B + num uint64 // 8B + str string // 16B + bin []byte // 24B + iface any // 16B } func valueOfString(v string) Value { @@ -45,7 +45,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, bin: v} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { return Value{typ: ifaceType, iface: v} } @@ -55,6 +55,6 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return v.bin } -func (v Value) getIface() interface{} { +func (v Value) getIface() any { return v.iface } diff --git a/reflect/protoreflect/value_test.go b/reflect/protoreflect/value_test.go index d3879001d..4393e5f62 100644 --- a/reflect/protoreflect/value_test.go +++ b/reflect/protoreflect/value_test.go @@ -21,7 +21,7 @@ func TestValue(t *testing.T) { tests := []struct { in Value - want interface{} + want any }{ {in: Value{}}, {in: ValueOf(nil)}, @@ -146,7 +146,7 @@ func BenchmarkValue(b *testing.B) { const testdata = "The quick brown fox jumped over the lazy dog." var sink1 string var sink2 Value - var sink3 interface{} + var sink3 any // Baseline measures the time to store a string into a native variable. b.Run("Baseline", func(b *testing.B) { diff --git a/reflect/protoreflect/value_union.go b/reflect/protoreflect/value_union.go index 160309731..9fe83cef5 100644 --- a/reflect/protoreflect/value_union.go +++ b/reflect/protoreflect/value_union.go @@ -69,8 +69,8 @@ import ( // composite Value. Modifying an empty, read-only value panics. type Value value -// The protoreflect API uses a custom Value union type instead of interface{} -// to keep the future open for performance optimizations. Using an interface{} +// The protoreflect API uses a custom Value union type instead of any +// to keep the future open for performance optimizations. Using an any // always incurs an allocation for primitives (e.g., int64) since it needs to // be boxed on the heap (as interfaces can only contain pointers natively). // Instead, we represent the Value union as a flat struct that internally keeps @@ -85,7 +85,7 @@ type Value value // ValueOf returns a Value initialized with the concrete value stored in v. // This panics if the type does not match one of the allowed types in the // Value union. -func ValueOf(v interface{}) Value { +func ValueOf(v any) Value { switch v := v.(type) { case nil: return Value{} @@ -192,10 +192,10 @@ func (v Value) IsValid() bool { return v.typ != nilType } -// Interface returns v as an interface{}. +// Interface returns v as an any. // // Invariant: v == ValueOf(v).Interface() -func (v Value) Interface() interface{} { +func (v Value) Interface() any { switch v.typ { case nilType: return nil @@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool { return Value(k).IsValid() } -// Interface returns k as an interface{}. -func (k MapKey) Interface() interface{} { +// Interface returns k as an any. +func (k MapKey) Interface() any { return Value(k).Interface() } diff --git a/reflect/protoreflect/value_unsafe_go120.go b/reflect/protoreflect/value_unsafe_go120.go index b1fdbe3e8..7f3583ead 100644 --- a/reflect/protoreflect/value_unsafe_go120.go +++ b/reflect/protoreflect/value_unsafe_go120.go @@ -45,7 +45,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value { p := (*sliceHeader)(unsafe.Pointer(&v)) return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) { *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} return x } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/reflect/protoreflect/value_unsafe_go121.go b/reflect/protoreflect/value_unsafe_go121.go index 435470111..f7d386990 100644 --- a/reflect/protoreflect/value_unsafe_go121.go +++ b/reflect/protoreflect/value_unsafe_go121.go @@ -15,7 +15,7 @@ import ( type ( ifaceHeader struct { - _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. Type unsafe.Pointer Data unsafe.Pointer } @@ -37,7 +37,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -70,7 +70,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -81,7 +81,7 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return unsafe.Slice((*byte)(v.ptr), v.num) } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/reflect/protoregistry/registry.go b/reflect/protoregistry/registry.go index 6267dc52a..de1777339 100644 --- a/reflect/protoregistry/registry.go +++ b/reflect/protoregistry/registry.go @@ -95,7 +95,7 @@ type Files struct { // multiple files. Only top-level declarations are registered. // Note that enum values are in the top-level since that are in the same // scope as the parent enum. - descsByName map[protoreflect.FullName]interface{} + descsByName map[protoreflect.FullName]any filesByPath map[string][]protoreflect.FileDescriptor numFiles int } @@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { defer globalMutex.Unlock() } if r.descsByName == nil { - r.descsByName = map[protoreflect.FullName]interface{}{ + r.descsByName = map[protoreflect.FullName]any{ "": &packageDescriptor{}, } r.filesByPath = make(map[string][]protoreflect.FileDescriptor) @@ -485,7 +485,7 @@ type Types struct { } type ( - typesByName map[protoreflect.FullName]interface{} + typesByName map[protoreflect.FullName]any extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType ) @@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { return nil } -func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { +func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error { name := desc.FullName() prev := r.typesByName[name] if prev != nil { @@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p } } -func typeName(t interface{}) string { +func typeName(t any) string { switch t.(type) { case protoreflect.EnumType: return "enum" @@ -854,7 +854,7 @@ func typeName(t interface{}) string { } } -func amendErrorWithCaller(err error, prev, curr interface{}) error { +func amendErrorWithCaller(err error, prev, curr any) error { prevPkg := goPackage(prev) currPkg := goPackage(curr) if prevPkg == "" || currPkg == "" || prevPkg == currPkg { @@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error { return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) } -func goPackage(v interface{}) string { +func goPackage(v any) string { switch d := v.(type) { case protoreflect.EnumType: v = d.Descriptor() diff --git a/testing/protocmp/reflect.go b/testing/protocmp/reflect.go index 0a5e47467..36f7cd9e6 100644 --- a/testing/protocmp/reflect.go +++ b/testing/protocmp/reflect.go @@ -16,7 +16,7 @@ import ( "google.golang.org/protobuf/runtime/protoiface" ) -func reflectValueOf(v interface{}) protoreflect.Value { +func reflectValueOf(v any) protoreflect.Value { switch v := v.(type) { case Enum: return protoreflect.ValueOfEnum(v.Number()) diff --git a/testing/protocmp/util.go b/testing/protocmp/util.go index dec34f20c..838e70fbc 100644 --- a/testing/protocmp/util.go +++ b/testing/protocmp/util.go @@ -32,7 +32,7 @@ var ( // values of a map field, or standalone [Enum] values // - [][Enum] for list fields // - map[K][Enum] for map fields -// - interface{} for a [Message] map entry value +// - any for a [Message] map entry value // // This must be used in conjunction with [Transform]. func FilterEnum(enum protoreflect.Enum, opt cmp.Option) cmp.Option { @@ -48,7 +48,7 @@ func FilterEnum(enum protoreflect.Enum, opt cmp.Option) cmp.Option { // values of a map field, or standalone [Message] values // - [][Message] for list fields // - map[K][Message] for map fields -// - interface{} for a [Message] map entry value +// - any for a [Message] map entry value // // This must be used in conjunction with [Transform]. func FilterMessage(message proto.Message, opt cmp.Option) cmp.Option { @@ -62,7 +62,7 @@ func FilterMessage(message proto.Message, opt cmp.Option) cmp.Option { // - T for singular fields // - []T for list fields // - map[K]T for map fields -// - interface{} for a [Message] map entry value +// - any for a [Message] map entry value // // This must be used in conjunction with [Transform]. func FilterField(message proto.Message, name protoreflect.Name, opt cmp.Option) cmp.Option { @@ -78,7 +78,7 @@ func FilterField(message proto.Message, name protoreflect.Name, opt cmp.Option) // - T for singular fields // - []T for list fields // - map[K]T for map fields -// - interface{} for a [Message] map entry value +// - any for a [Message] map entry value // // This must be used in conjunction with [Transform]. func FilterOneof(message proto.Message, name protoreflect.Name, opt cmp.Option) cmp.Option { @@ -525,7 +525,7 @@ func IgnoreUnknown() cmp.Option { // consider using [github.com/google/go-cmp/cmp/cmpopts.SortSlices] instead. // // This must be used in conjunction with [Transform]. -func SortRepeated(lessFunc interface{}) cmp.Option { +func SortRepeated(lessFunc any) cmp.Option { t, ok := checkTTBFunc(lessFunc) if !ok { panic(fmt.Sprintf("invalid less function: %T", lessFunc)) @@ -589,7 +589,7 @@ func SortRepeated(lessFunc interface{}) cmp.Option { }, opt) } -func checkTTBFunc(lessFunc interface{}) (reflect.Type, bool) { +func checkTTBFunc(lessFunc any) (reflect.Type, bool) { switch t := reflect.TypeOf(lessFunc); { case t == nil: return nil, false @@ -634,7 +634,7 @@ func SortRepeatedFields(message proto.Message, names ...protoreflect.Name) cmp.O panic(fmt.Sprintf("message field %q is not repeated", fd.FullName())) } - var lessFunc interface{} + var lessFunc any switch fd.Kind() { case protoreflect.BoolKind: lessFunc = func(x, y bool) bool { return !x && y } diff --git a/testing/protocmp/util_test.go b/testing/protocmp/util_test.go index ed386e447..fcc032633 100644 --- a/testing/protocmp/util_test.go +++ b/testing/protocmp/util_test.go @@ -22,7 +22,7 @@ import ( func TestEqual(t *testing.T) { type test struct { - x, y interface{} + x, y any opts cmp.Options want bool } @@ -77,38 +77,38 @@ func TestEqual(t *testing.T) { opts: cmp.Options{Transform()}, want: false, }, { - x: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, - y: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, + x: struct{ I any }{(*testpb.TestAllTypes)(nil)}, + y: struct{ I any }{(*testpb.TestAllTypes)(nil)}, opts: cmp.Options{Transform()}, want: true, }, { - x: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, - y: struct{ I interface{} }{new(testpb.TestAllTypes)}, + x: struct{ I any }{(*testpb.TestAllTypes)(nil)}, + y: struct{ I any }{new(testpb.TestAllTypes)}, opts: cmp.Options{Transform()}, want: false, }, { - x: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, - y: struct{ I interface{} }{dynamicpb.NewMessage(allTypesDesc)}, + x: struct{ I any }{(*testpb.TestAllTypes)(nil)}, + y: struct{ I any }{dynamicpb.NewMessage(allTypesDesc)}, opts: cmp.Options{Transform()}, want: false, }, { - x: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, - y: struct{ I interface{} }{new(testpb.TestAllTypes)}, + x: struct{ I any }{(*testpb.TestAllTypes)(nil)}, + y: struct{ I any }{new(testpb.TestAllTypes)}, opts: cmp.Options{Transform(), IgnoreEmptyMessages()}, want: true, }, { - x: struct{ I interface{} }{(*testpb.TestAllTypes)(nil)}, - y: struct{ I interface{} }{dynamicpb.NewMessage(allTypesDesc)}, + x: struct{ I any }{(*testpb.TestAllTypes)(nil)}, + y: struct{ I any }{dynamicpb.NewMessage(allTypesDesc)}, opts: cmp.Options{Transform(), IgnoreEmptyMessages()}, want: true, }, { - x: struct{ I interface{} }{new(testpb.TestAllTypes)}, - y: struct{ I interface{} }{new(testpb.TestAllTypes)}, + x: struct{ I any }{new(testpb.TestAllTypes)}, + y: struct{ I any }{new(testpb.TestAllTypes)}, opts: cmp.Options{Transform()}, want: true, }, { - x: struct{ I interface{} }{new(testpb.TestAllTypes)}, - y: struct{ I interface{} }{dynamicpb.NewMessage(allTypesDesc)}, + x: struct{ I any }{new(testpb.TestAllTypes)}, + y: struct{ I any }{dynamicpb.NewMessage(allTypesDesc)}, opts: cmp.Options{Transform()}, want: true, }, { @@ -607,7 +607,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalNestedEnum: testpb.TestAllTypes_BAR.Enum()}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -631,7 +631,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalNestedEnum: testpb.TestAllTypes_BAR.Enum()}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -652,7 +652,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedNestedEnum: []testpb.TestAllTypes_NestedEnum{testpb.TestAllTypes_BAR}}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -676,7 +676,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedNestedEnum: []testpb.TestAllTypes_NestedEnum{testpb.TestAllTypes_BAR}}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -697,7 +697,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapStringNestedEnum: map[string]testpb.TestAllTypes_NestedEnum{"k": testpb.TestAllTypes_BAR}}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.ForeignEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -721,7 +721,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapStringNestedEnum: map[string]testpb.TestAllTypes_NestedEnum{"k": testpb.TestAllTypes_BAR}}, opts: cmp.Options{ Transform(), - FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterEnum(testpb.TestAllTypes_NestedEnum(0), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -745,7 +745,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalNestedMessage: &testpb.TestAllTypes_NestedMessage{A: proto.Int32(2)}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -769,7 +769,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalNestedMessage: &testpb.TestAllTypes_NestedMessage{A: proto.Int32(2)}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -790,7 +790,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedNestedMessage: []*testpb.TestAllTypes_NestedMessage{{A: proto.Int32(2)}}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -814,7 +814,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedNestedMessage: []*testpb.TestAllTypes_NestedMessage{{A: proto.Int32(2)}}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -835,7 +835,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapStringNestedMessage: map[string]*testpb.TestAllTypes_NestedMessage{"k": {A: proto.Int32(2)}}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllExtensions), cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter type }, { @@ -859,7 +859,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapStringNestedMessage: map[string]*testpb.TestAllTypes_NestedMessage{"k": {A: proto.Int32(2)}}}, opts: cmp.Options{ Transform(), - FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterMessage(new(testpb.TestAllTypes_NestedMessage), cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -883,7 +883,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalInt32: proto.Int32(2)}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "optional_int64", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "optional_int64", cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter name }, { @@ -899,7 +899,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OptionalInt32: proto.Int32(2)}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "optional_int32", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "optional_int32", cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -920,7 +920,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedInt32: []int32{2}}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "repeated_int64", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "repeated_int64", cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter name }, { @@ -936,7 +936,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{RepeatedInt32: []int32{2}}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "repeated_int32", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "repeated_int32", cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -957,7 +957,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapInt32Int32: map[int32]int32{2: 2}}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "map_int64_int64", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "map_int64_int64", cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter name }, { @@ -973,7 +973,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{MapInt32Int32: map[int32]int32{2: 2}}, opts: cmp.Options{ Transform(), - FilterField(new(testpb.TestAllTypes), "map_int32_int32", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterField(new(testpb.TestAllTypes), "map_int32_int32", cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }, { @@ -997,7 +997,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OneofField: &testpb.TestAllTypes_OneofUint32{2}}, opts: cmp.Options{ Transform(), - FilterOneof(new(testpb.TestAllTypes), "oneof_optional", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterOneof(new(testpb.TestAllTypes), "oneof_optional", cmp.Comparer(func(x, y any) bool { return true })), }, want: false, // mismatching filter name }, { @@ -1021,7 +1021,7 @@ func TestEqual(t *testing.T) { y: &testpb.TestAllTypes{OneofField: &testpb.TestAllTypes_OneofUint32{2}}, opts: cmp.Options{ Transform(), - FilterOneof(new(testpb.TestAllTypes), "oneof_field", cmp.Comparer(func(x, y interface{}) bool { return true })), + FilterOneof(new(testpb.TestAllTypes), "oneof_field", cmp.Comparer(func(x, y any) bool { return true })), }, want: true, }}...) @@ -1299,18 +1299,18 @@ func TestEqual(t *testing.T) { type setField struct { num protoreflect.FieldNumber - val interface{} + val any } type setUnknown struct { raw protoreflect.RawFields } type setExtension struct { typ protoreflect.ExtensionType - val interface{} + val any } // apply applies a sequence of mutating operations to m. -func apply(m proto.Message, ops ...interface{}) proto.Message { +func apply(m proto.Message, ops ...any) proto.Message { mr := m.ProtoReflect() md := mr.Descriptor() for _, op := range ops { diff --git a/testing/protocmp/xform.go b/testing/protocmp/xform.go index 0a1aef9b4..de29d9732 100644 --- a/testing/protocmp/xform.go +++ b/testing/protocmp/xform.go @@ -115,7 +115,7 @@ func (t1 messageMeta) Equal(t2 messageMeta) bool { // of the encoded field (as the [protoreflect.RawFields] type). // // Message values must not be created by or mutated by users. -type Message map[string]interface{} +type Message map[string]any // Unwrap returns the original message value. // It returns nil if this Message was not constructed from another message. @@ -226,7 +226,7 @@ func Transform(opts ...option) cmp.Option { } return false - }, cmp.Transformer("protocmp.Transform", func(v interface{}) Message { + }, cmp.Transformer("protocmp.Transform", func(v any) Message { // For user convenience, shallow copy the message value if necessary // in order for it to implement the message interface. if rv := reflect.ValueOf(v); rv.IsValid() && rv.Kind() != reflect.Ptr && !isMessageType(rv.Type()) { @@ -303,7 +303,7 @@ func (xf *transformer) transformMessage(m protoreflect.Message) Message { return mx } -func (xf *transformer) transformList(fd protoreflect.FieldDescriptor, lv protoreflect.List) interface{} { +func (xf *transformer) transformList(fd protoreflect.FieldDescriptor, lv protoreflect.List) any { t := protoKindToGoType(fd.Kind()) rv := reflect.MakeSlice(reflect.SliceOf(t), lv.Len(), lv.Len()) for i := 0; i < lv.Len(); i++ { @@ -313,7 +313,7 @@ func (xf *transformer) transformList(fd protoreflect.FieldDescriptor, lv protore return rv.Interface() } -func (xf *transformer) transformMap(fd protoreflect.FieldDescriptor, mv protoreflect.Map) interface{} { +func (xf *transformer) transformMap(fd protoreflect.FieldDescriptor, mv protoreflect.Map) any { kfd := fd.MapKey() vfd := fd.MapValue() kt := protoKindToGoType(kfd.Kind()) @@ -328,7 +328,7 @@ func (xf *transformer) transformMap(fd protoreflect.FieldDescriptor, mv protoref return rv.Interface() } -func (xf *transformer) transformSingular(fd protoreflect.FieldDescriptor, v protoreflect.Value) interface{} { +func (xf *transformer) transformSingular(fd protoreflect.FieldDescriptor, v protoreflect.Value) any { switch fd.Kind() { case protoreflect.EnumKind: return Enum{num: v.Enum(), ed: fd.Enum()} diff --git a/testing/prototest/message.go b/testing/prototest/message.go index ee1bd4797..ebe1b871a 100644 --- a/testing/prototest/message.go +++ b/testing/prototest/message.go @@ -421,7 +421,7 @@ func testFieldMap(t testing.TB, m protoreflect.Message, fd protoreflect.FieldDes } } -type testMap map[interface{}]protoreflect.Value +type testMap map[any]protoreflect.Value func (m testMap) Get(k protoreflect.MapKey) protoreflect.Value { return m[k.Interface()] } func (m testMap) Set(k protoreflect.MapKey, v protoreflect.Value) { m[k.Interface()] = v } diff --git a/types/descriptorpb/descriptor.pb.go b/types/descriptorpb/descriptor.pb.go index 10c9030eb..d1b65d7d5 100644 --- a/types/descriptorpb/descriptor.pb.go +++ b/types/descriptorpb/descriptor.pb.go @@ -5227,7 +5227,7 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ +var file_google_protobuf_descriptor_proto_goTypes = []any{ (Edition)(0), // 0: google.protobuf.Edition (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type @@ -5369,7 +5369,7 @@ func file_google_protobuf_descriptor_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorSet); i { case 0: return &v.state @@ -5381,7 +5381,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorProto); i { case 0: return &v.state @@ -5393,7 +5393,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto); i { case 0: return &v.state @@ -5405,7 +5405,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions); i { case 0: return &v.state @@ -5419,7 +5419,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*FieldDescriptorProto); i { case 0: return &v.state @@ -5431,7 +5431,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*OneofDescriptorProto); i { case 0: return &v.state @@ -5443,7 +5443,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto); i { case 0: return &v.state @@ -5455,7 +5455,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EnumValueDescriptorProto); i { case 0: return &v.state @@ -5467,7 +5467,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ServiceDescriptorProto); i { case 0: return &v.state @@ -5479,7 +5479,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*MethodDescriptorProto); i { case 0: return &v.state @@ -5491,7 +5491,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*FileOptions); i { case 0: return &v.state @@ -5505,7 +5505,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*MessageOptions); i { case 0: return &v.state @@ -5519,7 +5519,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions); i { case 0: return &v.state @@ -5533,7 +5533,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*OneofOptions); i { case 0: return &v.state @@ -5547,7 +5547,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*EnumOptions); i { case 0: return &v.state @@ -5561,7 +5561,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*EnumValueOptions); i { case 0: return &v.state @@ -5575,7 +5575,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ServiceOptions); i { case 0: return &v.state @@ -5589,7 +5589,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*MethodOptions); i { case 0: return &v.state @@ -5603,7 +5603,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption); i { case 0: return &v.state @@ -5615,7 +5615,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*FeatureSet); i { case 0: return &v.state @@ -5629,7 +5629,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults); i { case 0: return &v.state @@ -5641,7 +5641,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo); i { case 0: return &v.state @@ -5653,7 +5653,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state @@ -5665,7 +5665,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state @@ -5677,7 +5677,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state @@ -5689,7 +5689,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions_Declaration); i { case 0: return &v.state @@ -5701,7 +5701,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { case 0: return &v.state @@ -5713,7 +5713,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_EditionDefault); i { case 0: return &v.state @@ -5725,7 +5725,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_FeatureSupport); i { case 0: return &v.state @@ -5737,7 +5737,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption_NamePart); i { case 0: return &v.state @@ -5749,7 +5749,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { case 0: return &v.state @@ -5761,7 +5761,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo_Location); i { case 0: return &v.state @@ -5773,7 +5773,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state diff --git a/types/dynamicpb/dynamic.go b/types/dynamicpb/dynamic.go index 39b024b46..1ba1dfa5a 100644 --- a/types/dynamicpb/dynamic.go +++ b/types/dynamicpb/dynamic.go @@ -294,7 +294,7 @@ func (m *Message) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { case fd.IsMap(): return protoreflect.ValueOfMap(&dynamicMap{ desc: fd, - mapv: make(map[interface{}]protoreflect.Value), + mapv: make(map[any]protoreflect.Value), }) case fd.IsList(): return protoreflect.ValueOfList(&dynamicList{desc: fd}) @@ -450,7 +450,7 @@ func (x *dynamicList) IsValid() bool { type dynamicMap struct { desc protoreflect.FieldDescriptor - mapv map[interface{}]protoreflect.Value + mapv map[any]protoreflect.Value } func (x *dynamicMap) Get(k protoreflect.MapKey) protoreflect.Value { return x.mapv[k.Interface()] } @@ -634,11 +634,11 @@ func newListEntry(fd protoreflect.FieldDescriptor) protoreflect.Value { // // The InterfaceOf and ValueOf methods of the extension type are defined as: // -// func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { +// func (xt extensionType) ValueOf(iv any) protoreflect.Value { // return protoreflect.ValueOf(iv) // } // -// func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { +// func (xt extensionType) InterfaceOf(v protoreflect.Value) any { // return v.Interface() // } // @@ -658,7 +658,7 @@ func (xt extensionType) New() protoreflect.Value { case xt.desc.IsMap(): return protoreflect.ValueOfMap(&dynamicMap{ desc: xt.desc, - mapv: make(map[interface{}]protoreflect.Value), + mapv: make(map[any]protoreflect.Value), }) case xt.desc.IsList(): return protoreflect.ValueOfList(&dynamicList{desc: xt.desc}) @@ -686,18 +686,18 @@ func (xt extensionType) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { return xt.desc } -func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value { +func (xt extensionType) ValueOf(iv any) protoreflect.Value { v := protoreflect.ValueOf(iv) typecheck(xt.desc, v) return v } -func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} { +func (xt extensionType) InterfaceOf(v protoreflect.Value) any { typecheck(xt.desc, v) return v.Interface() } -func (xt extensionType) IsValidInterface(iv interface{}) bool { +func (xt extensionType) IsValidInterface(iv any) bool { return typeIsValid(xt.desc, protoreflect.ValueOf(iv)) == nil } diff --git a/types/gofeaturespb/go_features.pb.go b/types/gofeaturespb/go_features.pb.go index b0df3fb33..aebdddba1 100644 --- a/types/gofeaturespb/go_features.pb.go +++ b/types/gofeaturespb/go_features.pb.go @@ -126,7 +126,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { } var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_go_features_proto_goTypes = []interface{}{ +var file_google_protobuf_go_features_proto_goTypes = []any{ (*GoFeatures)(nil), // 0: pb.GoFeatures (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet } @@ -146,7 +146,7 @@ func file_google_protobuf_go_features_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GoFeatures); i { case 0: return &v.state diff --git a/types/known/anypb/any.pb.go b/types/known/anypb/any.pb.go index 9de51be54..7172b43d3 100644 --- a/types/known/anypb/any.pb.go +++ b/types/known/anypb/any.pb.go @@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte { } var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_any_proto_goTypes = []interface{}{ +var file_google_protobuf_any_proto_goTypes = []any{ (*Any)(nil), // 0: google.protobuf.Any } var file_google_protobuf_any_proto_depIdxs = []int32{ @@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Any); i { case 0: return &v.state diff --git a/types/known/apipb/api.pb.go b/types/known/apipb/api.pb.go index 335be6eb7..4f2fe89ef 100644 --- a/types/known/apipb/api.pb.go +++ b/types/known/apipb/api.pb.go @@ -488,7 +488,7 @@ func file_google_protobuf_api_proto_rawDescGZIP() []byte { } var file_google_protobuf_api_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_protobuf_api_proto_goTypes = []interface{}{ +var file_google_protobuf_api_proto_goTypes = []any{ (*Api)(nil), // 0: google.protobuf.Api (*Method)(nil), // 1: google.protobuf.Method (*Mixin)(nil), // 2: google.protobuf.Mixin @@ -517,7 +517,7 @@ func file_google_protobuf_api_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_api_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Api); i { case 0: return &v.state @@ -529,7 +529,7 @@ func file_google_protobuf_api_proto_init() { return nil } } - file_google_protobuf_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_api_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Method); i { case 0: return &v.state @@ -541,7 +541,7 @@ func file_google_protobuf_api_proto_init() { return nil } } - file_google_protobuf_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_api_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Mixin); i { case 0: return &v.state diff --git a/types/known/durationpb/duration.pb.go b/types/known/durationpb/duration.pb.go index df709a8dd..1b71bcd91 100644 --- a/types/known/durationpb/duration.pb.go +++ b/types/known/durationpb/duration.pb.go @@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte { } var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_duration_proto_goTypes = []interface{}{ +var file_google_protobuf_duration_proto_goTypes = []any{ (*Duration)(nil), // 0: google.protobuf.Duration } var file_google_protobuf_duration_proto_depIdxs = []int32{ @@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Duration); i { case 0: return &v.state diff --git a/types/known/emptypb/empty.pb.go b/types/known/emptypb/empty.pb.go index 9a7277ba3..d87b4fb82 100644 --- a/types/known/emptypb/empty.pb.go +++ b/types/known/emptypb/empty.pb.go @@ -115,7 +115,7 @@ func file_google_protobuf_empty_proto_rawDescGZIP() []byte { } var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_empty_proto_goTypes = []interface{}{ +var file_google_protobuf_empty_proto_goTypes = []any{ (*Empty)(nil), // 0: google.protobuf.Empty } var file_google_protobuf_empty_proto_depIdxs = []int32{ @@ -132,7 +132,7 @@ func file_google_protobuf_empty_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Empty); i { case 0: return &v.state diff --git a/types/known/fieldmaskpb/field_mask.pb.go b/types/known/fieldmaskpb/field_mask.pb.go index e8789cb33..ac1e91bb6 100644 --- a/types/known/fieldmaskpb/field_mask.pb.go +++ b/types/known/fieldmaskpb/field_mask.pb.go @@ -537,7 +537,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { } var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_field_mask_proto_goTypes = []interface{}{ +var file_google_protobuf_field_mask_proto_goTypes = []any{ (*FieldMask)(nil), // 0: google.protobuf.FieldMask } var file_google_protobuf_field_mask_proto_depIdxs = []int32{ @@ -554,7 +554,7 @@ func file_google_protobuf_field_mask_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldMask); i { case 0: return &v.state diff --git a/types/known/sourcecontextpb/source_context.pb.go b/types/known/sourcecontextpb/source_context.pb.go index 0980d5aed..fa1857800 100644 --- a/types/known/sourcecontextpb/source_context.pb.go +++ b/types/known/sourcecontextpb/source_context.pb.go @@ -125,7 +125,7 @@ func file_google_protobuf_source_context_proto_rawDescGZIP() []byte { } var file_google_protobuf_source_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_source_context_proto_goTypes = []interface{}{ +var file_google_protobuf_source_context_proto_goTypes = []any{ (*SourceContext)(nil), // 0: google.protobuf.SourceContext } var file_google_protobuf_source_context_proto_depIdxs = []int32{ @@ -142,7 +142,7 @@ func file_google_protobuf_source_context_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_source_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_source_context_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*SourceContext); i { case 0: return &v.state diff --git a/types/known/structpb/struct.pb.go b/types/known/structpb/struct.pb.go index d2bac8b88..d45361cbc 100644 --- a/types/known/structpb/struct.pb.go +++ b/types/known/structpb/struct.pb.go @@ -49,11 +49,11 @@ // The standard Go "encoding/json" package has functionality to serialize // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and // ListValue.AsSlice methods can convert the protobuf message representation into -// a form represented by interface{}, map[string]interface{}, and []interface{}. +// a form represented by any, map[string]any, and []any. // This form can be used with other packages that operate on such data structures // and also directly with the standard json package. // -// In order to convert the interface{}, map[string]interface{}, and []interface{} +// In order to convert the any, map[string]any, and []any // forms back as Value, Struct, and ListValue messages, use the NewStruct, // NewList, and NewValue constructor functions. // @@ -88,28 +88,28 @@ // // To construct a Value message representing the above JSON object: // -// m, err := structpb.NewValue(map[string]interface{}{ +// m, err := structpb.NewValue(map[string]any{ // "firstName": "John", // "lastName": "Smith", // "isAlive": true, // "age": 27, -// "address": map[string]interface{}{ +// "address": map[string]any{ // "streetAddress": "21 2nd Street", // "city": "New York", // "state": "NY", // "postalCode": "10021-3100", // }, -// "phoneNumbers": []interface{}{ -// map[string]interface{}{ +// "phoneNumbers": []any{ +// map[string]any{ // "type": "home", // "number": "212 555-1234", // }, -// map[string]interface{}{ +// map[string]any{ // "type": "office", // "number": "646 555-4567", // }, // }, -// "children": []interface{}{}, +// "children": []any{}, // "spouse": nil, // }) // if err != nil { @@ -197,7 +197,7 @@ type Struct struct { // NewStruct constructs a Struct from a general-purpose Go map. // The map keys must be valid UTF-8. // The map values are converted using NewValue. -func NewStruct(v map[string]interface{}) (*Struct, error) { +func NewStruct(v map[string]any) (*Struct, error) { x := &Struct{Fields: make(map[string]*Value, len(v))} for k, v := range v { if !utf8.ValidString(k) { @@ -214,9 +214,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) { // AsMap converts x to a general-purpose Go map. // The map values are converted by calling Value.AsInterface. -func (x *Struct) AsMap() map[string]interface{} { +func (x *Struct) AsMap() map[string]any { f := x.GetFields() - vs := make(map[string]interface{}, len(f)) + vs := make(map[string]any, len(f)) for k, v := range f { vs[k] = v.AsInterface() } @@ -306,13 +306,13 @@ type Value struct { // ║ float32, float64 │ stored as NumberValue ║ // ║ string │ stored as StringValue; must be valid UTF-8 ║ // ║ []byte │ stored as StringValue; base64-encoded ║ -// ║ map[string]interface{} │ stored as StructValue ║ -// ║ []interface{} │ stored as ListValue ║ +// ║ map[string]any │ stored as StructValue ║ +// ║ []any │ stored as ListValue ║ // ╚════════════════════════╧════════════════════════════════════════════╝ // // When converting an int64 or uint64 to a NumberValue, numeric precision loss // is possible since they are stored as a float64. -func NewValue(v interface{}) (*Value, error) { +func NewValue(v any) (*Value, error) { switch v := v.(type) { case nil: return NewNullValue(), nil @@ -342,13 +342,13 @@ func NewValue(v interface{}) (*Value, error) { case []byte: s := base64.StdEncoding.EncodeToString(v) return NewStringValue(s), nil - case map[string]interface{}: + case map[string]any: v2, err := NewStruct(v) if err != nil { return nil, err } return NewStructValue(v2), nil - case []interface{}: + case []any: v2, err := NewList(v) if err != nil { return nil, err @@ -396,7 +396,7 @@ func NewListValue(v *ListValue) *Value { // // Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are // converted as strings to remain compatible with MarshalJSON. -func (x *Value) AsInterface() interface{} { +func (x *Value) AsInterface() any { switch v := x.GetKind().(type) { case *Value_NumberValue: if v != nil { @@ -580,7 +580,7 @@ type ListValue struct { // NewList constructs a ListValue from a general-purpose Go slice. // The slice elements are converted using NewValue. -func NewList(v []interface{}) (*ListValue, error) { +func NewList(v []any) (*ListValue, error) { x := &ListValue{Values: make([]*Value, len(v))} for i, v := range v { var err error @@ -594,9 +594,9 @@ func NewList(v []interface{}) (*ListValue, error) { // AsSlice converts x to a general-purpose Go slice. // The slice elements are converted by calling Value.AsInterface. -func (x *ListValue) AsSlice() []interface{} { +func (x *ListValue) AsSlice() []any { vals := x.GetValues() - vs := make([]interface{}, len(vals)) + vs := make([]any, len(vals)) for i, v := range vals { vs[i] = v.AsInterface() } @@ -716,7 +716,7 @@ func file_google_protobuf_struct_proto_rawDescGZIP() []byte { var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_protobuf_struct_proto_goTypes = []interface{}{ +var file_google_protobuf_struct_proto_goTypes = []any{ (NullValue)(0), // 0: google.protobuf.NullValue (*Struct)(nil), // 1: google.protobuf.Struct (*Value)(nil), // 2: google.protobuf.Value @@ -743,7 +743,7 @@ func file_google_protobuf_struct_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Struct); i { case 0: return &v.state @@ -755,7 +755,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Value); i { case 0: return &v.state @@ -767,7 +767,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListValue); i { case 0: return &v.state @@ -780,7 +780,7 @@ func file_google_protobuf_struct_proto_init() { } } } - file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{ (*Value_NullValue)(nil), (*Value_NumberValue)(nil), (*Value_StringValue)(nil), diff --git a/types/known/structpb/struct_test.go b/types/known/structpb/struct_test.go index 643f74022..beb9c077f 100644 --- a/types/known/structpb/struct_test.go +++ b/types/known/structpb/struct_test.go @@ -17,7 +17,7 @@ import ( spb "google.golang.org/protobuf/types/known/structpb" ) -var equateJSON = cmpopts.AcyclicTransformer("UnmarshalJSON", func(in []byte) (out interface{}) { +var equateJSON = cmpopts.AcyclicTransformer("UnmarshalJSON", func(in []byte) (out any) { if err := json.Unmarshal(in, &out); err != nil { return in } @@ -26,17 +26,17 @@ var equateJSON = cmpopts.AcyclicTransformer("UnmarshalJSON", func(in []byte) (ou func TestToStruct(t *testing.T) { tests := []struct { - in map[string]interface{} + in map[string]any wantPB *spb.Struct wantErr error }{{ in: nil, wantPB: new(spb.Struct), }, { - in: make(map[string]interface{}), + in: make(map[string]any), wantPB: new(spb.Struct), }, { - in: map[string]interface{}{ + in: map[string]any{ "nil": nil, "bool": bool(false), "int": int(-123), @@ -49,8 +49,8 @@ func TestToStruct(t *testing.T) { "float64": float64(123.456), "string": string("hello, world!"), "bytes": []byte("\xde\xad\xbe\xef"), - "map": map[string]interface{}{"k1": "v1", "k2": "v2"}, - "slice": []interface{}{"one", "two", "three"}, + "map": map[string]any{"k1": "v1", "k2": "v2"}, + "slice": []any{"one", "two", "three"}, }, wantPB: &spb.Struct{Fields: map[string]*spb.Value{ "nil": spb.NewNullValue(), @@ -76,13 +76,13 @@ func TestToStruct(t *testing.T) { }}), }}, }, { - in: map[string]interface{}{"\xde\xad\xbe\xef": ""}, + in: map[string]any{"\xde\xad\xbe\xef": ""}, wantErr: cmpopts.AnyError, }, { - in: map[string]interface{}{"": "\xde\xad\xbe\xef"}, + in: map[string]any{"": "\xde\xad\xbe\xef"}, wantErr: cmpopts.AnyError, }, { - in: map[string]interface{}{"key": protoreflect.Name("named string")}, + in: map[string]any{"key": protoreflect.Name("named string")}, wantErr: cmpopts.AnyError, }} @@ -100,16 +100,16 @@ func TestToStruct(t *testing.T) { func TestFromStruct(t *testing.T) { tests := []struct { in *spb.Struct - want map[string]interface{} + want map[string]any }{{ in: nil, - want: make(map[string]interface{}), + want: make(map[string]any), }, { in: new(spb.Struct), - want: make(map[string]interface{}), + want: make(map[string]any), }, { in: &spb.Struct{Fields: make(map[string]*spb.Value)}, - want: make(map[string]interface{}), + want: make(map[string]any), }, { in: &spb.Struct{Fields: map[string]*spb.Value{ "nil": spb.NewNullValue(), @@ -134,7 +134,7 @@ func TestFromStruct(t *testing.T) { spb.NewStringValue("three"), }}), }}, - want: map[string]interface{}{ + want: map[string]any{ "nil": nil, "bool": bool(false), "int": float64(-123), @@ -147,8 +147,8 @@ func TestFromStruct(t *testing.T) { "float64": float64(float64(123.456)), "string": string("hello, world!"), "bytes": string("3q2+7w=="), - "map": map[string]interface{}{"k1": "v1", "k2": "v2"}, - "slice": []interface{}{"one", "two", "three"}, + "map": map[string]any{"k1": "v1", "k2": "v2"}, + "slice": []any{"one", "two", "three"}, }, }} @@ -173,17 +173,17 @@ func TestFromStruct(t *testing.T) { func TestToListValue(t *testing.T) { tests := []struct { - in []interface{} + in []any wantPB *spb.ListValue wantErr error }{{ in: nil, wantPB: new(spb.ListValue), }, { - in: make([]interface{}, 0), + in: make([]any, 0), wantPB: new(spb.ListValue), }, { - in: []interface{}{ + in: []any{ nil, bool(false), int(-123), @@ -196,8 +196,8 @@ func TestToListValue(t *testing.T) { float64(123.456), string("hello, world!"), []byte("\xde\xad\xbe\xef"), - map[string]interface{}{"k1": "v1", "k2": "v2"}, - []interface{}{"one", "two", "three"}, + map[string]any{"k1": "v1", "k2": "v2"}, + []any{"one", "two", "three"}, }, wantPB: &spb.ListValue{Values: []*spb.Value{ spb.NewNullValue(), @@ -223,10 +223,10 @@ func TestToListValue(t *testing.T) { }}), }}, }, { - in: []interface{}{"\xde\xad\xbe\xef"}, + in: []any{"\xde\xad\xbe\xef"}, wantErr: cmpopts.AnyError, }, { - in: []interface{}{protoreflect.Name("named string")}, + in: []any{protoreflect.Name("named string")}, wantErr: cmpopts.AnyError, }} @@ -244,16 +244,16 @@ func TestToListValue(t *testing.T) { func TestFromListValue(t *testing.T) { tests := []struct { in *spb.ListValue - want []interface{} + want []any }{{ in: nil, - want: make([]interface{}, 0), + want: make([]any, 0), }, { in: new(spb.ListValue), - want: make([]interface{}, 0), + want: make([]any, 0), }, { in: &spb.ListValue{Values: make([]*spb.Value, 0)}, - want: make([]interface{}, 0), + want: make([]any, 0), }, { in: &spb.ListValue{Values: []*spb.Value{ spb.NewNullValue(), @@ -278,7 +278,7 @@ func TestFromListValue(t *testing.T) { spb.NewStringValue("three"), }}), }}, - want: []interface{}{ + want: []any{ nil, bool(false), float64(-123), @@ -291,8 +291,8 @@ func TestFromListValue(t *testing.T) { float64(float64(123.456)), string("hello, world!"), string("3q2+7w=="), - map[string]interface{}{"k1": "v1", "k2": "v2"}, - []interface{}{"one", "two", "three"}, + map[string]any{"k1": "v1", "k2": "v2"}, + []any{"one", "two", "three"}, }, }} @@ -317,7 +317,7 @@ func TestFromListValue(t *testing.T) { func TestToValue(t *testing.T) { tests := []struct { - in interface{} + in any wantPB *spb.Value wantErr error }{{ @@ -357,25 +357,25 @@ func TestToValue(t *testing.T) { in: []byte("\xde\xad\xbe\xef"), wantPB: spb.NewStringValue("3q2+7w=="), }, { - in: map[string]interface{}(nil), + in: map[string]any(nil), wantPB: spb.NewStructValue(nil), }, { - in: make(map[string]interface{}), + in: make(map[string]any), wantPB: spb.NewStructValue(nil), }, { - in: map[string]interface{}{"k1": "v1", "k2": "v2"}, + in: map[string]any{"k1": "v1", "k2": "v2"}, wantPB: spb.NewStructValue(&spb.Struct{Fields: map[string]*spb.Value{ "k1": spb.NewStringValue("v1"), "k2": spb.NewStringValue("v2"), }}), }, { - in: []interface{}(nil), + in: []any(nil), wantPB: spb.NewListValue(nil), }, { - in: make([]interface{}, 0), + in: make([]any, 0), wantPB: spb.NewListValue(nil), }, { - in: []interface{}{"one", "two", "three"}, + in: []any{"one", "two", "three"}, wantPB: spb.NewListValue(&spb.ListValue{Values: []*spb.Value{ spb.NewStringValue("one"), spb.NewStringValue("two"), @@ -403,7 +403,7 @@ func TestToValue(t *testing.T) { func TestFromValue(t *testing.T) { tests := []struct { in *spb.Value - want interface{} + want any }{{ in: nil, want: nil, @@ -472,27 +472,27 @@ func TestFromValue(t *testing.T) { want: nil, }, { in: &spb.Value{Kind: &spb.Value_StructValue{}}, - want: make(map[string]interface{}), + want: make(map[string]any), }, { in: spb.NewListValue(&spb.ListValue{Values: []*spb.Value{ spb.NewStringValue("one"), spb.NewStringValue("two"), spb.NewStringValue("three"), }}), - want: []interface{}{"one", "two", "three"}, + want: []any{"one", "two", "three"}, }, { in: &spb.Value{Kind: (*spb.Value_ListValue)(nil)}, want: nil, }, { in: &spb.Value{Kind: &spb.Value_ListValue{}}, - want: make([]interface{}, 0), + want: make([]any, 0), }, { in: spb.NewListValue(&spb.ListValue{Values: []*spb.Value{ spb.NewStringValue("one"), spb.NewStringValue("two"), spb.NewStringValue("three"), }}), - want: []interface{}{"one", "two", "three"}, + want: []any{"one", "two", "three"}, }} for _, tt := range tests { diff --git a/types/known/timestamppb/timestamp.pb.go b/types/known/timestamppb/timestamp.pb.go index 81511a336..83a5a645b 100644 --- a/types/known/timestamppb/timestamp.pb.go +++ b/types/known/timestamppb/timestamp.pb.go @@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { } var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ +var file_google_protobuf_timestamp_proto_goTypes = []any{ (*Timestamp)(nil), // 0: google.protobuf.Timestamp } var file_google_protobuf_timestamp_proto_depIdxs = []int32{ @@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Timestamp); i { case 0: return &v.state diff --git a/types/known/typepb/type.pb.go b/types/known/typepb/type.pb.go index 4cb8d0a59..52887fd5d 100644 --- a/types/known/typepb/type.pb.go +++ b/types/known/typepb/type.pb.go @@ -868,7 +868,7 @@ func file_google_protobuf_type_proto_rawDescGZIP() []byte { var file_google_protobuf_type_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_google_protobuf_type_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_google_protobuf_type_proto_goTypes = []interface{}{ +var file_google_protobuf_type_proto_goTypes = []any{ (Syntax)(0), // 0: google.protobuf.Syntax (Field_Kind)(0), // 1: google.protobuf.Field.Kind (Field_Cardinality)(0), // 2: google.protobuf.Field.Cardinality @@ -907,7 +907,7 @@ func file_google_protobuf_type_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_type_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Type); i { case 0: return &v.state @@ -919,7 +919,7 @@ func file_google_protobuf_type_proto_init() { return nil } } - file_google_protobuf_type_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_type_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Field); i { case 0: return &v.state @@ -931,7 +931,7 @@ func file_google_protobuf_type_proto_init() { return nil } } - file_google_protobuf_type_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_type_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Enum); i { case 0: return &v.state @@ -943,7 +943,7 @@ func file_google_protobuf_type_proto_init() { return nil } } - file_google_protobuf_type_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_type_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*EnumValue); i { case 0: return &v.state @@ -955,7 +955,7 @@ func file_google_protobuf_type_proto_init() { return nil } } - file_google_protobuf_type_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_type_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Option); i { case 0: return &v.state diff --git a/types/known/wrapperspb/wrappers.pb.go b/types/known/wrapperspb/wrappers.pb.go index 762a87130..e473f826a 100644 --- a/types/known/wrapperspb/wrappers.pb.go +++ b/types/known/wrapperspb/wrappers.pb.go @@ -605,7 +605,7 @@ func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte { } var file_google_protobuf_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_google_protobuf_wrappers_proto_goTypes = []interface{}{ +var file_google_protobuf_wrappers_proto_goTypes = []any{ (*DoubleValue)(nil), // 0: google.protobuf.DoubleValue (*FloatValue)(nil), // 1: google.protobuf.FloatValue (*Int64Value)(nil), // 2: google.protobuf.Int64Value @@ -630,7 +630,7 @@ func file_google_protobuf_wrappers_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DoubleValue); i { case 0: return &v.state @@ -642,7 +642,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FloatValue); i { case 0: return &v.state @@ -654,7 +654,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Int64Value); i { case 0: return &v.state @@ -666,7 +666,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UInt64Value); i { case 0: return &v.state @@ -678,7 +678,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Int32Value); i { case 0: return &v.state @@ -690,7 +690,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*UInt32Value); i { case 0: return &v.state @@ -702,7 +702,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BoolValue); i { case 0: return &v.state @@ -714,7 +714,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*StringValue); i { case 0: return &v.state @@ -726,7 +726,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*BytesValue); i { case 0: return &v.state diff --git a/types/pluginpb/plugin.pb.go b/types/pluginpb/plugin.pb.go index 620728f8c..9066bcc7f 100644 --- a/types/pluginpb/plugin.pb.go +++ b/types/pluginpb/plugin.pb.go @@ -591,7 +591,7 @@ func file_google_protobuf_compiler_plugin_proto_rawDescGZIP() []byte { var file_google_protobuf_compiler_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_protobuf_compiler_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_protobuf_compiler_plugin_proto_goTypes = []interface{}{ +var file_google_protobuf_compiler_plugin_proto_goTypes = []any{ (CodeGeneratorResponse_Feature)(0), // 0: google.protobuf.compiler.CodeGeneratorResponse.Feature (*Version)(nil), // 1: google.protobuf.compiler.Version (*CodeGeneratorRequest)(nil), // 2: google.protobuf.compiler.CodeGeneratorRequest @@ -619,7 +619,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_compiler_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Version); i { case 0: return &v.state @@ -631,7 +631,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorRequest); i { case 0: return &v.state @@ -643,7 +643,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorResponse); i { case 0: return &v.state @@ -655,7 +655,7 @@ func file_google_protobuf_compiler_plugin_proto_init() { return nil } } - file_google_protobuf_compiler_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_compiler_plugin_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CodeGeneratorResponse_File); i { case 0: return &v.state