all: remove unused purego support

fixes golang/protobuf#1640

Change-Id: I0e8f2df27c6b86a6f7325524d788c852a9266f1f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/606755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Lasse Folger <lassefolger@google.com>
Reviewed-by: Christian Höppner <hoeppi@google.com>
This commit is contained in:
Michael Stapelberg 2024-08-19 16:33:21 +02:00
parent b643888146
commit 0946f97cdf
102 changed files with 6 additions and 5263 deletions

View File

@ -163,27 +163,6 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
}
if len(f.allMessages) > 0 {
// Populate MessageInfo.Exporters.
g.P("if !", protoimplPackage.Ident("UnsafeEnabled"), " {")
for _, message := range f.allMessages {
if sf := f.allMessageFieldsByPtr[message]; len(sf.unexported) > 0 {
idx := f.allMessagesByPtr[message]
typesVar := messageTypesVarName(f)
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 != "" {
g.P("case ", i, ": return &v.", name)
}
}
g.P("default: return nil")
g.P("}")
g.P("}")
}
}
g.P("}")
// Populate MessageInfo.OneofWrappers.
for _, message := range f.allMessages {
if len(message.Oneofs) > 0 {

View File

@ -192,22 +192,6 @@ func file_cmd_protoc_gen_go_testdata_annotations_annotations_proto_init() {
if File_cmd_protoc_gen_go_testdata_annotations_annotations_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.weakFields
case 3:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -441,82 +441,6 @@ func file_cmd_protoc_gen_go_testdata_comments_comments_proto_init() {
if File_cmd_protoc_gen_go_testdata_comments_comments_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_comments_comments_proto_msgTypes[0].OneofWrappers = []any{
(*Message1_Oneof1AField1)(nil),
}

View File

@ -162,20 +162,6 @@ func file_cmd_protoc_gen_go_testdata_comments_deprecated_proto_init() {
if File_cmd_protoc_gen_go_testdata_comments_deprecated_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -153,36 +153,6 @@ func file_cmd_protoc_gen_go_testdata_extensions_base_base_proto_init() {
if File_cmd_protoc_gen_go_testdata_extensions_base_base_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1279,106 +1279,6 @@ func file_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto_init() {
if File_cmd_protoc_gen_go_testdata_extensions_ext_ext_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -108,20 +108,6 @@ func file_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto_init() {
if File_cmd_protoc_gen_go_testdata_extensions_extra_extra_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -725,20 +725,6 @@ func file_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto_init() {
if File_cmd_protoc_gen_go_testdata_extensions_proto3_ext3_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -405,32 +405,6 @@ func file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_init() {
if File_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_fieldnames_fieldnames_proto_msgTypes[0].OneofWrappers = []any{
(*Message_OneofConflictA)(nil),
(*Message_OneofNoConflict)(nil),

View File

@ -184,20 +184,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_a_proto_init() {
return
}
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 any, i int) any {
switch v := v.(*Public); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -128,20 +128,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_b_proto_init() {
if File_cmd_protoc_gen_go_testdata_import_public_b_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -134,20 +134,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_c_proto_init() {
return
}
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 any, i int) any {
switch v := v.(*UsingPublicImport); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -497,34 +497,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_init() {
return
}
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 any, i int) any {
switch v := v.(*M); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_import_public_sub_a_proto_msgTypes[0].OneofWrappers = []any{
(*M_OneofInt32)(nil),
(*M_OneofInt64)(nil),

View File

@ -97,20 +97,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub_b_proto_init() {
if File_cmd_protoc_gen_go_testdata_import_public_sub_b_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -98,20 +98,6 @@ func file_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto_init() {
if File_cmd_protoc_gen_go_testdata_import_public_sub2_a_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -95,20 +95,6 @@ func file_cmd_protoc_gen_go_testdata_imports_fmt_m_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_fmt_m_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -193,32 +193,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_a_1_m1_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -96,20 +96,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_a_1_m2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -96,20 +96,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_a_2_m3_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -96,20 +96,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_a_2_m4_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -97,20 +97,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_b_1_m1_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -97,20 +97,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_b_1_m2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -113,20 +113,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_import_a1m1_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -113,20 +113,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_import_a1m2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -184,20 +184,6 @@ func file_cmd_protoc_gen_go_testdata_imports_test_import_all_proto_init() {
if File_cmd_protoc_gen_go_testdata_imports_test_import_all_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -128,20 +128,6 @@ func file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_init() {
if File_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []any{
(*Foo_GetBar)(nil),
}

View File

@ -175,20 +175,6 @@ func file_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto_init() {
if File_cmd_protoc_gen_go_testdata_nopackage_nopackage_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -529,32 +529,6 @@ func file_cmd_protoc_gen_go_testdata_proto2_enum_proto_init() {
if File_cmd_protoc_gen_go_testdata_proto2_enum_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1772,80 +1772,6 @@ func file_cmd_protoc_gen_go_testdata_proto2_fields_proto_init() {
if File_cmd_protoc_gen_go_testdata_proto2_fields_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_proto2_fields_proto_msgTypes[0].OneofWrappers = []any{
(*FieldTestMessage_OneofBool)(nil),
(*FieldTestMessage_OneofEnum)(nil),

View File

@ -215,44 +215,6 @@ func file_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto_init() {
if File_cmd_protoc_gen_go_testdata_proto2_nested_messages_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -118,20 +118,6 @@ func file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_init() {
if File_cmd_protoc_gen_go_testdata_proto2_proto2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -630,32 +630,6 @@ func file_cmd_protoc_gen_go_testdata_proto3_fields_proto_init() {
if File_cmd_protoc_gen_go_testdata_proto3_fields_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -539,32 +539,6 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_enum_proto_init() {
if File_cmd_protoc_gen_go_testdata_protoeditions_enum_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1781,80 +1781,6 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_init() {
if File_cmd_protoc_gen_go_testdata_protoeditions_fields_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_protoeditions_fields_proto_msgTypes[0].OneofWrappers = []any{
(*FieldTestMessage_OneofBool)(nil),
(*FieldTestMessage_OneofEnum)(nil),

View File

@ -284,20 +284,6 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_legacy_enum_proto_init() {
if File_cmd_protoc_gen_go_testdata_protoeditions_legacy_enum_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cmd_protoc_gen_go_testdata_protoeditions_legacy_enum_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*ContainerForNestedEnum); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -260,32 +260,6 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_init
if File_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*MessageWithMaps); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cmd_protoc_gen_go_testdata_protoeditions_maps_and_delimited_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*MessageWithMaps_NestedMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -219,44 +219,6 @@ func file_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto_init()
if File_cmd_protoc_gen_go_testdata_protoeditions_nested_messages_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -214,20 +214,6 @@ func file_cmd_protoc_gen_go_testdata_retention_options_message_proto_init() {
if File_cmd_protoc_gen_go_testdata_retention_options_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -657,48 +657,6 @@ func file_cmd_protoc_gen_go_testdata_retention_retention_proto_init() {
return
}
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 any, i int) any {
switch v := v.(*Extendee); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_cmd_protoc_gen_go_testdata_retention_retention_proto_msgTypes[1].OneofWrappers = []any{
(*TopLevelMessage_I)(nil),
}

View File

@ -140,7 +140,6 @@ func TestIntegration(t *testing.T) {
}
runGo("Normal", command{}, "go", "test", "-race", "./...")
runGo("PureGo", command{}, "go", "test", "-race", "-tags", "purego", "./...")
runGo("Reflect", command{}, "go", "test", "-race", "-tags", "protoreflect", "./...")
if goVersion == golangLatest {
runGo("ProtoLegacyRace", command{}, "go", "test", "-race", "-tags", "protolegacy", "./...")

View File

@ -1,210 +0,0 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build purego || appengine
// +build purego appengine
package impl
import (
"reflect"
"google.golang.org/protobuf/encoding/protowire"
)
func sizeEnum(p pointer, f *coderFieldInfo, _ marshalOptions) (size int) {
v := p.v.Elem().Int()
return f.tagsize + protowire.SizeVarint(uint64(v))
}
func appendEnum(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
v := p.v.Elem().Int()
b = protowire.AppendVarint(b, f.wiretag)
b = protowire.AppendVarint(b, uint64(v))
return b, nil
}
func consumeEnum(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, _ unmarshalOptions) (out unmarshalOutput, err error) {
if wtyp != protowire.VarintType {
return out, errUnknown
}
v, n := protowire.ConsumeVarint(b)
if n < 0 {
return out, errDecode
}
p.v.Elem().SetInt(int64(v))
out.n = n
return out, nil
}
func mergeEnum(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
dst.v.Elem().Set(src.v.Elem())
}
var coderEnum = pointerCoderFuncs{
size: sizeEnum,
marshal: appendEnum,
unmarshal: consumeEnum,
merge: mergeEnum,
}
func sizeEnumNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
if p.v.Elem().Int() == 0 {
return 0
}
return sizeEnum(p, f, opts)
}
func appendEnumNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
if p.v.Elem().Int() == 0 {
return b, nil
}
return appendEnum(b, p, f, opts)
}
func mergeEnumNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
if src.v.Elem().Int() != 0 {
dst.v.Elem().Set(src.v.Elem())
}
}
var coderEnumNoZero = pointerCoderFuncs{
size: sizeEnumNoZero,
marshal: appendEnumNoZero,
unmarshal: consumeEnum,
merge: mergeEnumNoZero,
}
func sizeEnumPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
return sizeEnum(pointer{p.v.Elem()}, f, opts)
}
func appendEnumPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
return appendEnum(b, pointer{p.v.Elem()}, f, opts)
}
func consumeEnumPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
if wtyp != protowire.VarintType {
return out, errUnknown
}
if p.v.Elem().IsNil() {
p.v.Elem().Set(reflect.New(p.v.Elem().Type().Elem()))
}
return consumeEnum(b, pointer{p.v.Elem()}, wtyp, f, opts)
}
func mergeEnumPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
if !src.v.Elem().IsNil() {
v := reflect.New(dst.v.Type().Elem().Elem())
v.Elem().Set(src.v.Elem().Elem())
dst.v.Elem().Set(v)
}
}
var coderEnumPtr = pointerCoderFuncs{
size: sizeEnumPtr,
marshal: appendEnumPtr,
unmarshal: consumeEnumPtr,
merge: mergeEnumPtr,
}
func sizeEnumSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
s := p.v.Elem()
for i, llen := 0, s.Len(); i < llen; i++ {
size += protowire.SizeVarint(uint64(s.Index(i).Int())) + f.tagsize
}
return size
}
func appendEnumSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
s := p.v.Elem()
for i, llen := 0, s.Len(); i < llen; i++ {
b = protowire.AppendVarint(b, f.wiretag)
b = protowire.AppendVarint(b, uint64(s.Index(i).Int()))
}
return b, nil
}
func consumeEnumSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) {
s := p.v.Elem()
if wtyp == protowire.BytesType {
b, n := protowire.ConsumeBytes(b)
if n < 0 {
return out, errDecode
}
for len(b) > 0 {
v, n := protowire.ConsumeVarint(b)
if n < 0 {
return out, errDecode
}
rv := reflect.New(s.Type().Elem()).Elem()
rv.SetInt(int64(v))
s.Set(reflect.Append(s, rv))
b = b[n:]
}
out.n = n
return out, nil
}
if wtyp != protowire.VarintType {
return out, errUnknown
}
v, n := protowire.ConsumeVarint(b)
if n < 0 {
return out, errDecode
}
rv := reflect.New(s.Type().Elem()).Elem()
rv.SetInt(int64(v))
s.Set(reflect.Append(s, rv))
out.n = n
return out, nil
}
func mergeEnumSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) {
dst.v.Elem().Set(reflect.AppendSlice(dst.v.Elem(), src.v.Elem()))
}
var coderEnumSlice = pointerCoderFuncs{
size: sizeEnumSlice,
marshal: appendEnumSlice,
unmarshal: consumeEnumSlice,
merge: mergeEnumSlice,
}
func sizeEnumPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) {
s := p.v.Elem()
llen := s.Len()
if llen == 0 {
return 0
}
n := 0
for i := 0; i < llen; i++ {
n += protowire.SizeVarint(uint64(s.Index(i).Int()))
}
return f.tagsize + protowire.SizeBytes(n)
}
func appendEnumPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) {
s := p.v.Elem()
llen := s.Len()
if llen == 0 {
return b, nil
}
b = protowire.AppendVarint(b, f.wiretag)
n := 0
for i := 0; i < llen; i++ {
n += protowire.SizeVarint(uint64(s.Index(i).Int()))
}
b = protowire.AppendVarint(b, uint64(n))
for i := 0; i < llen; i++ {
b = protowire.AppendVarint(b, uint64(s.Index(i).Int()))
}
return b, nil
}
var coderEnumPackedSlice = pointerCoderFuncs{
size: sizeEnumPackedSlice,
marshal: appendEnumPackedSlice,
unmarshal: consumeEnumSlice,
merge: mergeEnumSlice,
}

View File

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine
// +build !purego,!appengine
package impl
// When using unsafe pointers, we can just treat enum values as int32s.

View File

@ -30,8 +30,8 @@ type MessageInfo struct {
// Desc is the underlying message descriptor type and must be populated.
Desc protoreflect.MessageDescriptor
// Exporter must be provided in a purego environment in order to provide
// access to unexported fields.
// Deprecated: Exporter will be removed the next time we bump
// protoimpl.GenVersion. See https://github.com/golang/protobuf/issues/1640
Exporter exporter
// OneofWrappers is list of pointers to oneof wrapper struct types.

View File

@ -1,215 +0,0 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build purego || appengine
// +build purego appengine
package impl
import (
"fmt"
"reflect"
"sync"
)
const UnsafeEnabled = false
// Pointer is an opaque pointer type.
type Pointer any
// offset represents the offset to a struct field, accessible from a pointer.
// The offset is the field index into a struct.
type offset struct {
index int
export exporter
}
// offsetOf returns a field offset for the struct field.
func offsetOf(f reflect.StructField, x exporter) offset {
if len(f.Index) != 1 {
panic("embedded structs are not supported")
}
if f.PkgPath == "" {
return offset{index: f.Index[0]} // field is already exported
}
if x == nil {
panic("exporter must be provided for unexported field")
}
return offset{index: f.Index[0], export: x}
}
// IsValid reports whether the offset is valid.
func (f offset) IsValid() bool { return f.index >= 0 }
// invalidOffset is an invalid field offset.
var invalidOffset = offset{index: -1}
// zeroOffset is a noop when calling pointer.Apply.
var zeroOffset = offset{index: 0}
// pointer is an abstract representation of a pointer to a struct or field.
type pointer struct{ v reflect.Value }
// pointerOf returns p as a pointer.
func pointerOf(p Pointer) pointer {
return pointerOfIface(p)
}
// pointerOfValue returns v as a pointer.
func pointerOfValue(v reflect.Value) pointer {
return pointer{v: v}
}
// pointerOfIface returns the pointer portion of an interface.
func pointerOfIface(v any) pointer {
return pointer{v: reflect.ValueOf(v)}
}
// IsNil reports whether the pointer is nil.
func (p pointer) IsNil() bool {
return p.v.IsNil()
}
// Apply adds an offset to the pointer to derive a new pointer
// to a specified field. The current pointer must be pointing at a struct.
func (p pointer) Apply(f offset) pointer {
if f.export != nil {
if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() {
return pointer{v: v}
}
}
return pointer{v: p.v.Elem().Field(f.index).Addr()}
}
// AsValueOf treats p as a pointer to an object of type t and returns the value.
// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t))
func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
if got := p.v.Type().Elem(); got != t {
panic(fmt.Sprintf("invalid type: got %v, want %v", got, t))
}
return p.v
}
// 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) any {
return p.AsValueOf(t).Interface()
}
func (p pointer) Bool() *bool { return p.v.Interface().(*bool) }
func (p pointer) BoolPtr() **bool { return p.v.Interface().(**bool) }
func (p pointer) BoolSlice() *[]bool { return p.v.Interface().(*[]bool) }
func (p pointer) Int32() *int32 { return p.v.Interface().(*int32) }
func (p pointer) Int32Ptr() **int32 { return p.v.Interface().(**int32) }
func (p pointer) Int32Slice() *[]int32 { return p.v.Interface().(*[]int32) }
func (p pointer) Int64() *int64 { return p.v.Interface().(*int64) }
func (p pointer) Int64Ptr() **int64 { return p.v.Interface().(**int64) }
func (p pointer) Int64Slice() *[]int64 { return p.v.Interface().(*[]int64) }
func (p pointer) Uint32() *uint32 { return p.v.Interface().(*uint32) }
func (p pointer) Uint32Ptr() **uint32 { return p.v.Interface().(**uint32) }
func (p pointer) Uint32Slice() *[]uint32 { return p.v.Interface().(*[]uint32) }
func (p pointer) Uint64() *uint64 { return p.v.Interface().(*uint64) }
func (p pointer) Uint64Ptr() **uint64 { return p.v.Interface().(**uint64) }
func (p pointer) Uint64Slice() *[]uint64 { return p.v.Interface().(*[]uint64) }
func (p pointer) Float32() *float32 { return p.v.Interface().(*float32) }
func (p pointer) Float32Ptr() **float32 { return p.v.Interface().(**float32) }
func (p pointer) Float32Slice() *[]float32 { return p.v.Interface().(*[]float32) }
func (p pointer) Float64() *float64 { return p.v.Interface().(*float64) }
func (p pointer) Float64Ptr() **float64 { return p.v.Interface().(**float64) }
func (p pointer) Float64Slice() *[]float64 { return p.v.Interface().(*[]float64) }
func (p pointer) String() *string { return p.v.Interface().(*string) }
func (p pointer) StringPtr() **string { return p.v.Interface().(**string) }
func (p pointer) StringSlice() *[]string { return p.v.Interface().(*[]string) }
func (p pointer) Bytes() *[]byte { return p.v.Interface().(*[]byte) }
func (p pointer) BytesPtr() **[]byte { return p.v.Interface().(**[]byte) }
func (p pointer) BytesSlice() *[][]byte { return p.v.Interface().(*[][]byte) }
func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.v.Interface().(*WeakFields)) }
func (p pointer) Extensions() *map[int32]ExtensionField {
return p.v.Interface().(*map[int32]ExtensionField)
}
func (p pointer) Elem() pointer {
return pointer{v: p.v.Elem()}
}
// PointerSlice copies []*T from p as a new []pointer.
// This behavior differs from the implementation in pointer_unsafe.go.
func (p pointer) PointerSlice() []pointer {
// TODO: reconsider this
if p.v.IsNil() {
return nil
}
n := p.v.Elem().Len()
s := make([]pointer, n)
for i := 0; i < n; i++ {
s[i] = pointer{v: p.v.Elem().Index(i)}
}
return s
}
// AppendPointerSlice appends v to p, which must be a []*T.
func (p pointer) AppendPointerSlice(v pointer) {
sp := p.v.Elem()
sp.Set(reflect.Append(sp, v.v))
}
// SetPointer sets *p to v.
func (p pointer) SetPointer(v pointer) {
p.v.Elem().Set(v.v)
}
func growSlice(p pointer, addCap int) {
// TODO: Once we only support Go 1.20 and newer, use reflect.Grow.
in := p.v.Elem()
out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap)
reflect.Copy(out, in)
p.v.Elem().Set(out)
}
func (p pointer) growBoolSlice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growInt32Slice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growUint32Slice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growInt64Slice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growUint64Slice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growFloat64Slice(addCap int) {
growSlice(p, addCap)
}
func (p pointer) growFloat32Slice(addCap int) {
growSlice(p, addCap)
}
func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") }
func (ms *messageState) pointer() pointer { panic("not supported") }
func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") }
func (ms *messageState) LoadMessageInfo() *MessageInfo { panic("not supported") }
func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { panic("not supported") }
type atomicNilMessage struct {
once sync.Once
m messageReflectWrapper
}
func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper {
m.once.Do(func() {
m.m.p = pointerOfIface(reflect.Zero(mi.GoReflectType).Interface())
m.m.mi = mi
})
return &m.m
}

View File

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine
// +build !purego,!appengine
package impl
import (

View File

@ -1,28 +0,0 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build purego || appengine
// +build purego appengine
package strs
import pref "google.golang.org/protobuf/reflect/protoreflect"
func UnsafeString(b []byte) string {
return string(b)
}
func UnsafeBytes(s string) []byte {
return []byte(s)
}
type Builder struct{}
func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName {
return prefix.Append(name)
}
func (*Builder) MakeString(b []byte) string {
return string(b)
}

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine && !go1.21
// +build !purego,!appengine,!go1.21
//go:build !go1.21
package strs

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine && go1.21
// +build !purego,!appengine,go1.21
//go:build go1.21
package strs

View File

@ -243,20 +243,6 @@ func file_internal_testprotos_benchmarks_micro_micro_proto_init() {
if File_internal_testprotos_benchmarks_micro_micro_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -738,56 +738,6 @@ func file_conformance_conformance_proto_init() {
if File_conformance_conformance_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_conformance_conformance_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*FailureSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_conformance_conformance_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*ConformanceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_conformance_conformance_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ConformanceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_conformance_conformance_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*JspbEncodingConfig); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_conformance_conformance_proto_msgTypes[1].OneofWrappers = []any{
(*ConformanceRequest_ProtobufPayload)(nil),
(*ConformanceRequest_JsonPayload)(nil),

View File

@ -1983,70 +1983,6 @@ func file_conformance_test_protos_test_messages_edition2023_proto_init() {
if File_conformance_test_protos_test_messages_edition2023_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_conformance_test_protos_test_messages_edition2023_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesEdition2023_OneofUint32)(nil),
(*TestAllTypesEdition2023_OneofNestedMessage)(nil),

View File

@ -4008,268 +4008,6 @@ func file_editions_golden_test_messages_proto2_editions_proto_init() {
if File_editions_golden_test_messages_proto2_editions_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_editions_golden_test_messages_proto2_editions_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto2_OneofUint32)(nil),
(*TestAllTypesProto2_OneofNestedMessage)(nil),

View File

@ -2683,68 +2683,6 @@ func file_editions_golden_test_messages_proto3_editions_proto_init() {
if File_editions_golden_test_messages_proto3_editions_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_editions_golden_test_messages_proto3_editions_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto3_OneofUint32)(nil),
(*TestAllTypesProto3_OneofNestedMessage)(nil),

View File

@ -3991,268 +3991,6 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
if File_google_protobuf_test_messages_proto2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto2_OneofUint32)(nil),
(*TestAllTypesProto2_OneofNestedMessage)(nil),

View File

@ -2660,68 +2660,6 @@ func file_google_protobuf_test_messages_proto3_proto_init() {
if File_google_protobuf_test_messages_proto3_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto3_OneofUint32)(nil),
(*TestAllTypesProto3_OneofNestedMessage)(nil),

View File

@ -1631,68 +1631,6 @@ func file_internal_testprotos_editionsfuzztest_test2_proto_init() {
if File_internal_testprotos_editionsfuzztest_test2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_editionsfuzztest_test2_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto2_OneofUint32)(nil),
(*TestAllTypesProto2_OneofNestedMessage)(nil),

View File

@ -1655,68 +1655,6 @@ func file_internal_testprotos_editionsfuzztest_test2editions_proto_init() {
if File_internal_testprotos_editionsfuzztest_test2editions_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_editionsfuzztest_test2editions_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto2Editions_OneofUint32)(nil),
(*TestAllTypesProto2Editions_OneofNestedMessage)(nil),

View File

@ -1565,44 +1565,6 @@ func file_internal_testprotos_editionsfuzztest_test3_proto_init() {
if File_internal_testprotos_editionsfuzztest_test3_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_editionsfuzztest_test3_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto3_OneofUint32)(nil),
(*TestAllTypesProto3_OneofNestedMessage)(nil),

View File

@ -1563,44 +1563,6 @@ func file_internal_testprotos_editionsfuzztest_test3editions_proto_init() {
if File_internal_testprotos_editionsfuzztest_test3editions_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_editionsfuzztest_test3editions_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypesProto3Editions_OneofUint32)(nil),
(*TestAllTypesProto3Editions_OneofNestedMessage)(nil),

View File

@ -1005,22 +1005,6 @@ func file_internal_testprotos_fieldtrack_fieldtrack_proto_init() {
if File_internal_testprotos_fieldtrack_fieldtrack_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.weakFields
case 3:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -226,20 +226,6 @@ func file_internal_testprotos_fuzz_fuzz_proto_init() {
if File_internal_testprotos_fuzz_fuzz_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -299,20 +299,6 @@ func file_internal_testprotos_irregular_test_proto_init() {
return
}
file_internal_testprotos_irregular_irregular_proto_init()
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_irregular_test_proto_msgTypes[0].OneofWrappers = []any{
(*Message_OneofMessage)(nil),
(*Message_OneofAberrantMessage)(nil),

View File

@ -260,46 +260,6 @@ func file_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto_ini
if File_internal_testprotos_lazy_lazy_extension_normalized_wire_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -749,94 +749,6 @@ func file_internal_testprotos_lazy_lazy_extension_test_proto_init() {
if File_internal_testprotos_lazy_lazy_extension_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -321,20 +321,6 @@ func file_internal_testprotos_legacy_legacy_proto_init() {
if File_internal_testprotos_legacy_legacy_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -154,34 +154,6 @@ func file_internal_testprotos_messageset_messagesetpb_message_set_proto_init() {
if File_internal_testprotos_messageset_messagesetpb_message_set_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -353,56 +353,6 @@ func file_internal_testprotos_messageset_msetextpb_msetextpb_proto_init() {
if File_internal_testprotos_messageset_msetextpb_msetextpb_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -361,44 +361,6 @@ func file_internal_testprotos_news_news_proto_init() {
if File_internal_testprotos_news_news_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -209,22 +209,6 @@ func file_internal_testprotos_order_order_proto_init() {
if File_internal_testprotos_order_order_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
}
file_internal_testprotos_order_order_proto_msgTypes[0].OneofWrappers = []any{
(*Message_Field_10)(nil),
}

View File

@ -132,20 +132,6 @@ func file_internal_testprotos_race_extender_test_proto_init() {
if File_internal_testprotos_race_extender_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -108,22 +108,6 @@ func file_internal_testprotos_race_message_test_proto_init() {
if File_internal_testprotos_race_message_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -498,58 +498,6 @@ func file_internal_testprotos_registry_test_proto_init() {
if File_internal_testprotos_registry_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -894,212 +894,6 @@ func file_internal_testprotos_required_required_proto_init() {
if File_internal_testprotos_required_required_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -5037,340 +5037,6 @@ 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 any, i int) any {
switch v := v.(*TestAllTypes); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.weakFields
case 3:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_test_test_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypes_OneofUint32)(nil),
(*TestAllTypes_OneofNestedMessage)(nil),

View File

@ -152,20 +152,6 @@ func file_internal_testprotos_test_test_import_proto_init() {
if File_internal_testprotos_test_test_import_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -95,20 +95,6 @@ func file_internal_testprotos_test_test_public_proto_init() {
if File_internal_testprotos_test_test_public_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -106,20 +106,6 @@ func file_internal_testprotos_test_weak1_test_weak_proto_init() {
if File_internal_testprotos_test_weak1_test_weak_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -106,20 +106,6 @@ func file_internal_testprotos_test_weak2_test_weak_proto_init() {
if File_internal_testprotos_test_weak2_test_weak_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -1646,44 +1646,6 @@ func file_internal_testprotos_test3_test_proto_init() {
return
}
file_internal_testprotos_test3_test_import_proto_init()
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_test3_test_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypes_OneofUint32)(nil),
(*TestAllTypes_OneofNestedMessage)(nil),

View File

@ -143,20 +143,6 @@ func file_internal_testprotos_test3_test_import_proto_init() {
if File_internal_testprotos_test3_test_import_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -2842,166 +2842,6 @@ func file_internal_testprotos_testeditions_test_proto_init() {
if File_internal_testprotos_testeditions_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_testeditions_test_proto_msgTypes[0].OneofWrappers = []any{
(*TestAllTypes_OneofUint32)(nil),
(*TestAllTypes_OneofNestedMessage)(nil),

View File

@ -1394,84 +1394,6 @@ func file_internal_testprotos_testeditions_test_extension_proto_init() {
return
}
file_internal_testprotos_testeditions_test_proto_init()
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -191,20 +191,6 @@ func file_internal_testprotos_testeditions_test_extension2_proto_init() {
return
}
file_internal_testprotos_testeditions_test_extension_proto_init()
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -2302,254 +2302,6 @@ func file_internal_testprotos_textpb2_test_proto_init() {
if File_internal_testprotos_textpb2_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_textpb2_test_proto_msgTypes[9].OneofWrappers = []any{
(*IndirectRequired_OneofNested)(nil),
}

View File

@ -1132,116 +1132,6 @@ func file_internal_testprotos_textpb3_test_proto_init() {
if File_internal_testprotos_textpb3_test_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_textpb3_test_proto_msgTypes[2].OneofWrappers = []any{}
file_internal_testprotos_textpb3_test_proto_msgTypes[6].OneofWrappers = []any{
(*Oneofs_OneofEnum)(nil),

View File

@ -2787,290 +2787,6 @@ func file_internal_testprotos_textpbeditions_test2_proto_init() {
if File_internal_testprotos_textpbeditions_test2_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_testprotos_textpbeditions_test2_proto_msgTypes[12].OneofWrappers = []any{
(*IndirectRequired_OneofNested)(nil),
}

View File

@ -1,60 +0,0 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build purego || appengine
// +build purego appengine
package protoreflect
import "google.golang.org/protobuf/internal/pragma"
type valueType int
const (
nilType valueType = iota
boolType
int32Type
int64Type
uint32Type
uint64Type
float32Type
float64Type
stringType
bytesType
enumType
ifaceType
)
// value is a union where only one type can be represented at a time.
// This uses a distinct field for each type. This is type safe in Go, but
// occupies more memory than necessary (72B).
type value struct {
pragma.DoNotCompare // 0B
typ valueType // 8B
num uint64 // 8B
str string // 16B
bin []byte // 24B
iface any // 16B
}
func valueOfString(v string) Value {
return Value{typ: stringType, str: v}
}
func valueOfBytes(v []byte) Value {
return Value{typ: bytesType, bin: v}
}
func valueOfIface(v any) Value {
return Value{typ: ifaceType, iface: v}
}
func (v Value) getString() string {
return v.str
}
func (v Value) getBytes() []byte {
return v.bin
}
func (v Value) getIface() any {
return v.iface
}

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine && !go1.21
// +build !purego,!appengine,!go1.21
//go:build !go1.21
package protoreflect

View File

@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego && !appengine && go1.21
// +build !purego,!appengine,go1.21
//go:build go1.21
package protoreflect

View File

@ -5385,424 +5385,6 @@ func file_google_protobuf_descriptor_proto_init() {
if File_google_protobuf_descriptor_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*FileDescriptorSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*FileDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*DescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*ExtensionRangeOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*FieldDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*OneofDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any {
switch v := v.(*EnumDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any {
switch v := v.(*EnumValueDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any {
switch v := v.(*ServiceDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any {
switch v := v.(*MethodDescriptorProto); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any {
switch v := v.(*FileOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any {
switch v := v.(*MessageOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any {
switch v := v.(*FieldOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any {
switch v := v.(*OneofOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any {
switch v := v.(*EnumOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any {
switch v := v.(*EnumValueOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any {
switch v := v.(*ServiceOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any {
switch v := v.(*MethodOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any {
switch v := v.(*UninterpretedOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any {
switch v := v.(*FeatureSet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
case 3:
return &v.extensionFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any {
switch v := v.(*FeatureSetDefaults); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any {
switch v := v.(*SourceCodeInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any {
switch v := v.(*GeneratedCodeInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -145,20 +145,6 @@ func file_google_protobuf_go_features_proto_init() {
if File_google_protobuf_go_features_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -461,20 +461,6 @@ func file_google_protobuf_any_proto_init() {
if File_google_protobuf_any_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Any); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -516,44 +516,6 @@ func file_google_protobuf_api_proto_init() {
if File_google_protobuf_api_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_api_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Api); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_api_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*Method); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_api_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*Mixin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -339,20 +339,6 @@ func file_google_protobuf_duration_proto_init() {
if File_google_protobuf_duration_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Duration); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -131,20 +131,6 @@ func file_google_protobuf_empty_proto_init() {
if File_google_protobuf_empty_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Empty); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -553,20 +553,6 @@ func file_google_protobuf_field_mask_proto_init() {
if File_google_protobuf_field_mask_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -141,20 +141,6 @@ func file_google_protobuf_source_context_proto_init() {
if File_google_protobuf_source_context_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
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
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -758,44 +758,6 @@ func file_google_protobuf_struct_proto_init() {
if File_google_protobuf_struct_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Struct); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*Value); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*ListValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{
(*Value_NullValue)(nil),
(*Value_NumberValue)(nil),

View File

@ -348,20 +348,6 @@ func file_google_protobuf_timestamp_proto_init() {
if File_google_protobuf_timestamp_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Timestamp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -906,68 +906,6 @@ func file_google_protobuf_type_proto_init() {
if File_google_protobuf_type_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_protobuf_type_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Type); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_type_proto_msgTypes[1].Exporter = func(v any, i int) any {
switch v := v.(*Field); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_type_proto_msgTypes[2].Exporter = func(v any, i int) any {
switch v := v.(*Enum); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_type_proto_msgTypes[3].Exporter = func(v any, i int) any {
switch v := v.(*EnumValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_type_proto_msgTypes[4].Exporter = func(v any, i int) any {
switch v := v.(*Option); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

Some files were not shown because too many files have changed in this diff Show More