-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(codegen): add support for build tags (#2012) #2807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Only one real change before we can merge this in. Appreciate you adding a test case.
//go:build {{.BuildTags}} | ||
// +build {{.BuildTags}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The // +build
syntax has been deprecated since Go 1.17. Let's remove it and only support //go:build
.
protos/plugin/codegen.proto
Outdated
@@ -78,6 +78,7 @@ message GoCode { | |||
bool emit_result_struct_pointers = 8; | |||
bool emit_params_struct_pointers = 9; | |||
bool emit_methods_with_db_argument = 10; | |||
string build_tags = 29; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this to the end of the message instead of in the middle?
Co-authored-by: Kyle Gray <[email protected]>
Co-authored-by: Kyle Gray <[email protected]>
Co-authored-by: Kyle Gray <[email protected]>
Thank you for the review. I've made the corrections, so please check again. |
Attempt at adding the feature for #2012.
I am not a native English speaker, so some variable names might not be appropriate.
I've added a new
build_tags
option, which gets inserted into the template when enabled.Fixes #2012