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:
1 parent
1c1878cfca
commit
84a9faff29
4 files changed
+11
-4
No files matched your search
@@ -1,3 +1,3 @@
|
||||
{{define "footer"}}
|
||||
<footer class="footer">{{.Name}} web UI · {{buildInfo}}</footer>
|
||||
<footer class="footer">{{.AppName}} web UI · {{buildInfo}}</footer>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user