Answer product-owner round 1: name the field exchange, and say in plain words what phone-exchange draws

This commit is contained in:
2026-10-04 17:42:46 +02:00
committed by Lillem4n
parent 2f712d6ec0
commit 59e3ebe65d
4 changed files with 19 additions and 17 deletions
+3 -2
View File
@@ -90,8 +90,9 @@ replacement, and each removed path, column or flag.
and carries the same three. `person.prefix` is null where a person has no title,
where it used to be an empty string, so `--format sql` writes `NULL` and a `string`
struct field reading it becomes `*string`.
- `en_US.phone-exchange` draws a central office code NANPA can assign: `200` to `999`,
never `N11`, `555`, `950`, `958`, `959` or `976`. `en_US.phone` draws its `exch` from it.
- `en_US.phone-exchange` draws the three digits after a US area code, as NANPA assigns
them: `200` to `999`, never `211` to `911` ending in `11`, nor `555`, `950`, `958`,
`959` or `976`. `en_US.phone` draws its `exchange` from it.
- `ErrNoColumns` is exported, so a caller can tell the one record fence a path can
answer from the rest.
- An error names a spelling that runs: a layout is named single-quoted and free of
+11 -10
View File
@@ -161,16 +161,17 @@ which binds a [name](#names), nor be `-`, which a struct tag reserves; dot-prefi
Each locale carries `address`, `color`, `company`, `date`, `email`, `first-name`,
`ip`, `last-name`, `person`, `phone`, `price`, `sentence`, `sex`, `time`, `url`,
`username`, `version` and `word`, formatted per locale; `sv_SE` adds
`personnummer` and `samordningsnummer`, `en_US` adds `ssn`, `itin` and `phone-exchange`. `misc`
carries `car`, `coordinate`, `creditcard` (Luhn-valid), `currency` (ISO 4217),
`datetime` (RFC 3339), `emoji`, `httpmethod`, `httpstatus`, `language` (ISO 639-1,
with its 639-2/T code), `loglevel` (syslog severity), `mac`, `mimetype`, `objectid`,
`port`, `protocol`, `territory` (ISO 3166-1), `timezone` (IANA), `tld` (IANA root
zone), `useragent` and `uuid` (v4). Many carry sub-fields — `misc.currency.symbol`,
`misc.territory.alpha2`, `misc.httpstatus.code` — which `--list` shows. `car`,
`currency`, `httpmethod`, `httpstatus`, `language`, `loglevel`, `mimetype`, `port`,
`protocol`, `territory`, `timezone`, `tld` and `useragent` are [tables](#table), so
`username`, `version` and `word`, formatted per locale; `sv_SE` adds `personnummer`
and `samordningsnummer`, `en_US` adds `ssn`, `itin` and `phone-exchange` (the three
digits after the area code). `misc` carries `car`, `coordinate`, `creditcard`
(Luhn-valid), `currency` (ISO 4217), `datetime` (RFC 3339), `emoji`, `httpmethod`,
`httpstatus`, `language` (ISO 639-1, with its 639-2/T code), `loglevel` (syslog
severity), `mac`, `mimetype`, `objectid`, `port`, `protocol`, `territory` (ISO
3166-1), `timezone` (IANA), `tld` (IANA root zone), `useragent` and `uuid` (v4). Many
carry sub-fields — `misc.currency.symbol`, `misc.territory.alpha2`,
`misc.httpstatus.code` — which `--list` shows. `car`, `currency`, `httpmethod`,
`httpstatus`, `language`, `loglevel`, `mimetype`, `port`, `protocol`, `territory`,
`timezone`, `tld` and `useragent` are [tables](#table), so
`misc.territory[SE].capital` and `misc.currency[Euro].symbol` select a row; `car` and
`useragent` carry no key or name, so they are drawn from rather than selected in.
+4 -4
View File
@@ -1,15 +1,15 @@
[
{
"format": "({area}) {exch}-{line}",
"format": "({area}) {exchange}-{line}",
"weight": 2,
"area": ["202", "212", "213", "305", "312", "404", "415", "469", "503", "512", "602", "617", "646", "702", "718", "720", "737", "773", "786", "808", "917"],
"exch": "{.phone-exchange}",
"exchange": "{.phone-exchange}",
"line": "{digits(4)}"
},
{
"format": "{area}-{exch}-{line}",
"format": "{area}-{exchange}-{line}",
"area": ["202", "212", "213", "305", "312", "404", "415", "469", "503", "512", "602", "617", "646", "702", "718", "720", "737", "773", "786", "808", "917"],
"exch": "{.phone-exchange}",
"exchange": "{.phone-exchange}",
"line": "{digits(4)}"
}
]
+1 -1
View File
@@ -13,7 +13,7 @@ var shippedIndex = map[string]shippedEntry{
"en_US.itin": {paths: []string{"", "area", "group", "serial"}},
"en_US.last-name": {paths: []string{"", "count", "name"}},
"en_US.person": {paths: []string{"", "first", "last", "prefix", "sex"}},
"en_US.phone": {paths: []string{"", "area", "exch", "line"}},
"en_US.phone": {paths: []string{"", "area", "exchange", "line"}},
"en_US.phone-exchange": {paths: []string{""}},
"en_US.price": {paths: []string{"", "amt", "cents"}},
"en_US.sentence": {paths: []string{"", "adj", "noun", "prep", "verb"}},