Replay each path's selectors through the walk for the family fence, require a key for a name, refuse a name shadowing a key, a table reading its own family and an ancestor's column clash, add the row node and family.go, and pin eight rows inline
Tests / vet + fmt + tests (pull_request) Successful in 1m8s
Tests / Gitea release from CHANGELOG.md (pull_request) Has been skipped

This commit is contained in:
2026-09-17 12:54:24 +02:00
parent fb83aa6178
commit 047237f361
14 changed files with 419 additions and 277 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ type Generator struct {
mu sync.Mutex
rand *session
categories map[string]node
root *folder // the categories as the node a path walks from
root folder // the categories as the node a path walks from, owned here so a walk allocates none
set drawSet // one Fake's draws, owned here so a walk pinning rows keeps them off the heap
records map[node]recordShape
structs map[reflect.Type]structResult
@@ -125,7 +125,7 @@ func New(opts ...Option) (*Generator, error) {
if err != nil {
return nil, fmt.Errorf("fejkdata: %w", err)
}
return &Generator{rand: rng, categories: cats, root: &folder{children: cats}}, nil
return &Generator{rand: rng, categories: cats}, nil
}
// List returns the sorted dotted paths Fake can render: every category, the dotted
@@ -170,7 +170,7 @@ func paths(n node) []string {
return []string{""}
case *table:
return tablePaths(n)
case *column:
case *column, *row:
return []string{""}
case *choice:
out := []string{""}