Skip to content

Commit 93b26e6

Browse files
buffligdsnet
authored andcommitted
protoc-gen-go: refactor generator by splitting up generateMessage (#657)
Split actual text generation passes of generateMessage out by first building a data structure suitable for code generation and then generate the output for each field in separate methods. Partially incorrect and unnecessary usage of g.In() and g.Out() has also been removed throughout the code generation as the output is properly formatted at the end of code generation anyway. The functionality is unchanged except for the order of oneof methods in the output file.
1 parent 427e165 commit 93b26e6

File tree

7 files changed

+1124
-861
lines changed

7 files changed

+1124
-861
lines changed

conformance/internal/conformance_proto/conformance.pb.go

Lines changed: 53 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonpb/jsonpb_test_proto/test_objects.pb.go

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/proto3_proto/proto3.pb.go

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)