From 16604de74c528926ec9c48ea1baac6519e733705 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 04:37:19 +0200 Subject: [PATCH] Name the table lookup the Generator doc's fixed tree excepts, and drop the renders restatement --- fejkdata.go | 5 +++-- holdfence.go | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fejkdata.go b/fejkdata.go index 5c2c232..8fa244a 100644 --- a/fejkdata.go +++ b/fejkdata.go @@ -28,8 +28,9 @@ var ErrNoData = errors.New("no data: WithoutShippedData needs at least one WithD // Generator generates fake data from a loaded namespace tree. Create one with [New]. // It is safe for concurrent use; a seeded sequence is reproducible only when drawn -// from one goroutine. The compiled tree is immutable after [New], so List, NewTemplate -// and NewRecordTemplate read it without a lock; mu guards the rest, which every render takes. +// from one goroutine. The compiled tree is fixed after [New] bar each table's row lookup, +// which its sync.Once builds on first use, so List, NewTemplate and NewRecordTemplate +// read it without a lock; mu guards the rest, which every render takes. type Generator struct { mu sync.Mutex rand *session diff --git a/holdfence.go b/holdfence.go index 627a79e..9343523 100644 --- a/holdfence.go +++ b/holdfence.go @@ -152,8 +152,7 @@ func isFixed(n node) bool { } // renders reports whether rendering n can reach anything in want, following the -// same edges expand does. seen keeps a node from being walked twice, so the walk -// ends across a cycle too. +// same edges expand does. func renders(n node, want, seen map[node]bool) bool { if want[n] { return true