Delete the sort-order restatements on walkNodes and compileFields

This commit is contained in:
2026-09-29 15:44:50 +02:00
committed by Lillem4n
parent 9b050994f5
commit 6ee7ee4234
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -5,8 +5,7 @@ import (
"sort"
)
// walkNodes calls fn once per contained node, passing the dot path that reaches it,
// visiting keys in sorted order.
// walkNodes calls fn once per contained node, passing the dot path that reaches it.
func walkNodes(root map[string]node, fn func(path string, n node) error) error {
for _, name := range sortedNames(root) {
if err := eachNode(root[name], name, fn); err != nil {
+1 -1
View File
@@ -371,7 +371,7 @@ func readOptions(m map[string]any, pos position) (templateOptions, error) {
return o, nil
}
// compileFields compiles every non-option key of a template object, in name order.
// compileFields compiles every non-option key of a template object.
func compileFields(m map[string]any, pos position) (map[string]node, error) {
fields := make(map[string]node, len(m))
keys := make([]string, 0, len(m))