summaryrefslogtreecommitdiff
path: root/optional/template_test.go
AgeCommit message (Collapse)Author
2024-12-01Introduce example_ prefix conventionxengineering
This allows to distinguish unit test files of the format `<name>_test.go` from full file examples like `example_<name>_test.go`.
2024-12-01Fix template example namexengineering
The naming conventions for test functions are a bit special and different to the normal naming conventions in Go. They are documented here [1]. This had the effect that godoc and pkg.go.dev did not display this example. Testing with `godoc` locally helped to debug this. Calling `go install golang.org/x/tools/cmd/godoc@latest` helped with the installation. [1]: https://go.dev/blog/examples
2024-11-08Add example for usage in Go templatesxengineering