Rename PageHeader.Name to AppName to avoid a field collision

A consuming project's own per-page data struct commonly embeds both
PageHeader and a domain type that has its own Name field (e.g. a
Kubernetes resource's name, as in yakwui's node/deployment/pod detail
pages) -- two same-depth promoted "Name" fields make html/template's
".Name" an ambiguous selector that only fails at execution time, not
at parse time.
This commit is contained in:
terminar committed 2026-09-01 14:11:33 +02:00
1 parent 1c1878cfca
commit 84a9faff29
4 files changed
+11 -4

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@ func TestNewRendererAndPage(t *testing.T) {
var buf bytes.Buffer
data := PageHeader{
Title: "Dashboard",
Name: "example",
AppName: "example",
Brand: "EXAMPLE",
BrandInitial: "e",
BasePath: "",