From 9ccb926124e84f46453b863f9cf3b1bdd93836ac Mon Sep 17 00:00:00 2001
From: xengineering <me@xengineering.eu>
Date: Sun, 1 Dec 2024 20:06:53 +0100
Subject: Fix template example name

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
---
 optional/template_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'optional')

diff --git a/optional/template_test.go b/optional/template_test.go
index ab4ce76..83b5821 100644
--- a/optional/template_test.go
+++ b/optional/template_test.go
@@ -8,7 +8,7 @@ import (
 	"xengineering.eu/optional-go/optional"
 )
 
-func ExampleTemplate() {
+func Example_template() {
 	data := struct {
 		Flag optional.Optional[bool]
 	}{
-- 
cgit v1.2.3-70-g09d2