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

docs: Document usage of new go tools feature in go1.24.0 #1067

Open
joerdav opened this issue Feb 12, 2025 · 0 comments
Open

docs: Document usage of new go tools feature in go1.24.0 #1067

joerdav opened this issue Feb 12, 2025 · 0 comments
Labels
docs documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@joerdav
Copy link
Collaborator

joerdav commented Feb 12, 2025

With the release of go1.24.0, there is a new feature allowing tools to be tracked in the go.mod.

You can run go get -tool github.com/a-h/templ/cmd/templ@latest to add the latest templ version as a tool.

Then you can run templ as normal using go tool templ. For example go tool templ generate.

This links the generator version to the runtime version specified in the go.mod. So you reduce the likelihood of generated code that is incompatible with the runtime version.

There should be a docs section outlining this, or at least that links to the go docs as a recommended way of tracking templ versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant