cmd/protoc-gen-go: group extension variable declarations
For better readability in godoc, group extension fields by the
target message that they are extending.
Change-Id: Icc0a247b37639e3dbf7a107810923b8ca8294724
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/189257
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/internal/testprotos/test/ext.pb.go b/internal/testprotos/test/ext.pb.go
index 289c00b..7922170 100644
--- a/internal/testprotos/test/ext.pb.go
+++ b/internal/testprotos/test/ext.pb.go
@@ -28,10 +28,13 @@
Filename: "test/ext.proto",
},
}
+
+// Extension fields to TestAllExtensions.
var (
- // extend goproto.proto.test.TestAllExtensions { optional int32 foreign_int32_extension = 2000; }
+ // optional int32 foreign_int32_extension = 2000;
E_ForeignInt32Extension = &file_test_ext_proto_extDescs[0]
)
+
var File_test_ext_proto protoreflect.FileDescriptor
var file_test_ext_proto_rawDesc = []byte{