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 10 additions and 6 deletions
Showing only changes of commit f5f4812403 - Show all commits
+6 -4
View File
@@ -291,10 +291,12 @@ ok, err := fejkdata.IsTemplate(arg) // an inline template by its shape, el
| `WithDataFS(fsys)` | layer an `fs.FS`, such as your own `embed.FS` |
| `WithoutShippedData()` | load only what you give |
`New` refuses a mistake in the data and `NewTemplate` one in the template, so on a
loaded generator `Fake` fails only for a path that names nothing or could name two
things, `FakeStruct` only for a non-struct argument or a type its tags do not describe,
with the same error every call, and `Template.Fake` cannot fail at all.
`New` refuses a mistake in the data, and `NewTemplate` one in the template. On a loaded
generator, each with the same error every call:
- `Fake` fails only for a path that names nothing or could name two things.
- `FakeStruct` fails only for a non-struct argument or a type its tags do not describe.
- `Template.Fake` cannot fail.
A `*Record` carries its columns via `Columns()` — each a `Column` of `Name`,
`DataType`, rendered `Value` and `Null` — and serializes them with `JSON()`
+3 -1
View File
@@ -210,7 +210,9 @@ by a `data-import/` script, as README goal 12 asks.
- Report every mistake a load finds in one error, as the decision "A load reports every
mistake at once" states: `New` and `NewTemplate` stop at the first, so data holding
two mistakes takes two runs to fix. Split it into sub-items before starting.
two mistakes takes two runs to fix. Split it into sub-items before starting, one of
them the shape a Go caller iterates and the CLI prints, and reword the README's
"`New` refuses a mistake in the data" to every mistake.
- Rename `newRand` to `newGeneratorState` and `Generator.rand` to `state`: both name
half of a `generatorState`, hiding its `{seq()}` counters, and `New`'s local `rng`
shadows the `rng` interface.