fix: green baseline, and let the template test itself #13

Merged
mathias merged 3 commits from fix/green-baseline-and-self-test into main 2026-09-17 16:16:38 +00:00
4 changed files with 17 additions and 5 deletions
Showing only changes of commit b40db025cc - Show all commits
+8 -1
View File
@@ -48,7 +48,14 @@ jobs:
- name: Install toolchain
run: |
go version
go install github.com/a-h/templ/cmd/templ@latest
# Pin the GENERATOR to the same version as the templ LIBRARY in
# go.mod. Installing @latest let them drift: the generator emitted
# calls (templruntime.WriteString) that the pinned library did not
# have, which is template-go-web#8. Nothing caught it because the
# guard skipped `check` in this repo entirely (#12).
templ_version="$(go list -m -f '{{.Version}}' github.com/a-h/templ)"
echo "templ library is $templ_version — installing the matching generator"
go install "github.com/a-h/templ/cmd/templ@$templ_version"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh \
| sh -s -- -b "$(go env GOPATH)/bin" v2.11.4
+4 -1
View File
@@ -27,4 +27,7 @@ go.work.sum
# Project-specific
bin/
*.templ.go
# templ writes <name>_templ.go -- this was '*.templ.go' (a dot, not an
# underscore) and therefore matched nothing, so generated files were only ever
# kept out of git by luck. template-go-web#8.
*_templ.go
+1 -3
View File
@@ -2,6 +2,4 @@ module __MODULE_PATH__
go 1.26
require (
github.com/a-h/templ v0.2.778
)
require github.com/a-h/templ v0.3.1020
+4
View File
@@ -0,0 +1,4 @@
github.com/a-h/templ v0.3.1020 h1:ypAT/L5ySWEnZ6Zft/5yfoWXYYkhFNvEFOeeqecg4tw=
github.com/a-h/templ v0.3.1020/go.mod h1:A2DlK61v+K+NRoGnhmYbNYVmtYHcFO5/AisMvBdDxTM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=