Add support to read gopb tags from proto request#170
Open
sudhiaithal wants to merge 1 commit intoalta:mainfrom
Open
Add support to read gopb tags from proto request#170sudhiaithal wants to merge 1 commit intoalta:mainfrom
sudhiaithal wants to merge 1 commit intoalta:mainfrom
Conversation
ydnar
requested changes
Aug 12, 2024
Contributor
ydnar
left a comment
There was a problem hiding this comment.
Thanks! Some minor phone feedback.
Can you add tests and example use cases?
| } | ||
| } | ||
| if !found { | ||
| panic("Not found") |
Contributor
There was a problem hiding this comment.
Should this return an error instead?
| for _, f := range p.gen.Files { | ||
| p.scanFile(f) | ||
| } | ||
| for _, f := range p.gen.Request.ProtoFile { |
Contributor
There was a problem hiding this comment.
Can you put this in a new scanRequest method?
| } else { | ||
| p.RenameField(ident.WithChild(mident, fident.GoName), newName, embed) // Field | ||
| childID := ident.WithChild(mident, fident.GoName) | ||
| log.Printf("child %v parent %v", childID, mident.GoName) |
5a96982 to
4b09e73
Compare
4b09e73 to
25deb65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the tags are added as part of proto request (mutating the file after generating) then these changes will help to read gopb tags