Move List's path enumeration into list.go, position into node.go and sortedNames into sorted.go
This commit is contained in:
@@ -3,7 +3,6 @@ package fejkdata
|
||||
import (
|
||||
"fmt"
|
||||
"slices"
|
||||
"sort"
|
||||
|
||||
"github.com/larvit/fejkdata/internal/invariant"
|
||||
)
|
||||
@@ -88,15 +87,6 @@ func namedNodes(m map[string]node) []namedNode {
|
||||
return out
|
||||
}
|
||||
|
||||
func sortedNames[V any](m map[string]V) []string {
|
||||
names := make([]string, 0, len(m))
|
||||
for name := range m {
|
||||
names = append(names, name)
|
||||
}
|
||||
sort.Strings(names)
|
||||
return names
|
||||
}
|
||||
|
||||
// renderEdge is a child a node renders into, labelled by what reaches it (a field
|
||||
// name, reference, or choice index) for a readable cycle report.
|
||||
type renderEdge struct {
|
||||
|
||||
Reference in New Issue
Block a user