Skip to content
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

Being able to mark generated files with go:build tags #2012

Closed
eladitzhakian opened this issue Jan 1, 2023 · 2 comments · Fixed by #2807
Closed

Being able to mark generated files with go:build tags #2012

eladitzhakian opened this issue Jan 1, 2023 · 2 comments · Fixed by #2807
Labels
enhancement New feature or request good first issue Good for newcomers 🔧 golang

Comments

@eladitzhakian
Copy link

What do you want to change?

It could be useful to be able to emit // go:build some-tag into the golang generated files

This way I can, for example, exclude them when running coverage tests 😇

What database engines need to be changed?

No response

What programming language backends need to be changed?

Go

@eladitzhakian eladitzhakian added enhancement New feature or request triage New issues that hasn't been reviewed labels Jan 1, 2023
@andrewmbenton andrewmbenton added 🔧 golang and removed triage New issues that hasn't been reviewed labels Jun 7, 2023
@andrewmbenton
Copy link
Collaborator

This seems like a pretty easy option to add to the sqlc v2 gen/go config, if someone wants to take a crack at it.

@kyleconroy kyleconroy added the good first issue Good for newcomers label Sep 29, 2023
@Hyuga-Tsukui
Copy link
Contributor

@kyleconroy

I find this feature very useful, and I'd like to try contributing. Would that be okay?

Hyuga-Tsukui added a commit to Hyuga-Tsukui/sqlc that referenced this issue Oct 5, 2023
kyleconroy added a commit that referenced this issue Oct 6, 2023
* feat(codegen): add support for build tags (#2012)

* Update docs/reference/config.md

* Update internal/codegen/golang/gen.go

---------

Co-authored-by: Kyle Gray <kyle@conroy.org>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers 🔧 golang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants