Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33

Open
lilleman wants to merge 966 commits from worktree-todo-relative-dates-exact-counts into main
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 16604de74c - Show all commits
+3 -2
View File
@@ -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]. // 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 // 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 // from one goroutine. The compiled tree is fixed after [New] bar each table's row lookup,
// and NewRecordTemplate read it without a lock; mu guards the rest, which every render takes. // 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 { type Generator struct {
mu sync.Mutex mu sync.Mutex
rand *session rand *session
+1 -2
View File
@@ -152,8 +152,7 @@ func isFixed(n node) bool {
} }
// renders reports whether rendering n can reach anything in want, following the // 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 // same edges expand does.
// ends across a cycle too.
func renders(n node, want, seen map[node]bool) bool { func renders(n node, want, seen map[node]bool) bool {
if want[n] { if want[n] {
return true return true