From 7b01a7fd6850e5540e2cda6708a191b5ce30c687 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 01:55:00 +0200 Subject: [PATCH] Say what List returns: fields, columns, linked tables, direct descents only --- README.md | 2 +- fejkdata.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 59d6b6f..3a6df86 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ if err != nil { log.Fatal(err) } v, err := f.Fake("sv_SE.address") // "Järvedsvägen 43\n891 77 Järved" -paths := f.List() // every path Fake accepts, sorted +paths := f.List() // the paths Fake renders, sorted; direct descents only v, err = f.FakeTemplate("name: {/sv_SE.person.last}") // compile + render in one call t, err := f.NewTemplate(`{"format":"name: {x}","x":["bosse","lina"]}`) // compile once v = t.Fake() // render many times, no re-parse diff --git a/fejkdata.go b/fejkdata.go index 7d00957..73d54ab 100644 --- a/fejkdata.go +++ b/fejkdata.go @@ -115,9 +115,9 @@ func New(opts ...Option) (*Generator, error) { return &Generator{rand: rng, categories: cats}, nil } -// List returns the sorted dotted paths Fake can render: every category, the dotted -// fields within a template. A choice consumes no segment, so a path continues -// through one only where every variant carries it, which is the rule Fake applies too. +// List returns the sorted dotted paths Fake renders: each category and every field, +// column and linked table below it, a direct descent at a time. A choice consumes no +// segment, so a path continues through one only where every variant carries it. func (f *Generator) List() []string { var out []string for _, name := range sortedNames(f.categories) {