Conversation
- Move tool directive (templ, golangci-lint, swag, mockgen) and esbuild to a separate go.tools.mod - Update Makefile to use `go tool -modfile=go.tools.mod` for all tool invocations - Remove individual install-* targets in favor of modfile-based tool resolution - Update go:generate directives to use -modfile flag - Significantly reduce indirect dependencies in root go.mod Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves Go-based developer tooling (templ, golangci-lint, swag, mockgen) and build-time dependencies (esbuild) out of the root module and into a dedicated go.tools.mod, then updates build/generate workflows to resolve tools via go tool -modfile=go.tools.mod.
Changes:
- Added
go.tools.modto hold tool directives and tool-only dependencies. - Updated
Makefile,.air.toml, andgo:generatedirectives to invoke tools viago tool -modfile=.... - Reduced root-module dependency surface by removing tool-only indirect requirements from
go.mod/go.sum.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/templates/generate.go | Switch templ generation to use tools modfile via go tool -modfile. |
| internal/mocks/generate.go | Switch mock generation to use tools modfile via go tool -modfile. |
| go.tools.mod | Introduces dedicated tools module with tool (...) directives and pinned tool dependency graph. |
| go.sum | Shrinks root module checksums by removing tool-only entries. |
| go.mod | Removes the root tool (...) block and prunes tool-only indirect requirements. |
| Makefile | Routes tool invocations through go tool -modfile=go.tools.mod and replaces install-* targets with modfile-based resolution. |
| .air.toml | Updates dev loop pre-command to run templ generation via tools modfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
go tool -modfile=go.tools.modfor all tool invocations