Ship en_US, sv_SE, misc, geo/SE and geo/US as Go packages exporting FS, listed by data.Modules(), and fail a bare New naming WithDataFS
This commit is contained in:
+8
-1
@@ -125,8 +125,15 @@ replacement, and each removed path, column or flag.
|
||||
its own quotes, a row of a table with no key is named as the path that selects it,
|
||||
`sv_SE.sex[f].first-name[Kim]`, and a category with no columns names the record
|
||||
that gives it one.
|
||||
- The shipped data comes in Go packages, one per module, each exporting `FS`:
|
||||
`github.com/larvit/fejkdata/data/en_US`, `…/sv_SE`, `…/misc`, `…/geo/SE` and
|
||||
`…/geo/US`. `data.Modules()`, from `github.com/larvit/fejkdata/data`, lists every one,
|
||||
and the CLI carries them all. `New` loads the modules `WithDataFS(modules...)` names and
|
||||
the folders `WithDataPath` names, and fails, naming `WithDataFS`, where no such option
|
||||
is given; `WithDataFS()` loads none. A manifest's `reads` lists the modules its source
|
||||
reads by default, and a reference naming nothing names them, or says there are none.
|
||||
- A data source whose root holds a `.fejkdata.json` manifest with an `index` loads each
|
||||
category on the first call reaching it, as the shipped set does. Data failing to load,
|
||||
category on the first call reaching it, as each shipped module does. Data failing to load,
|
||||
in `New` or on that first call, gives an error matching `ErrLoad`, and the CLI exits 1.
|
||||
A source without an index loads in `New`, with the shipped categories it reads. Every
|
||||
other shipped category loads on the first call reaching it, so one your replacement
|
||||
|
||||
Reference in New Issue
Block a user