Delete the sort-order restatements on walkNodes and compileFields
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user