Skip to content

Conversation

@sudhiaithal
Copy link

@sudhiaithal sudhiaithal commented Aug 12, 2024

If the tags are added as part of proto request (mutating the file after generating) then these changes will help to read gopb tags

Copy link
Contributor

@ydnar ydnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some minor phone feedback.

Can you add tests and example use cases?

}
}
if !found {
panic("Not found")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return an error instead?

for _, f := range p.gen.Files {
p.scanFile(f)
}
for _, f := range p.gen.Request.ProtoFile {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these debugging logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants