File/package naming convention conforming better to go standards - as ugly as it is

This commit is contained in:
bwilliams committed 2026-10-13 16:31:47 +01:00
1 parent be4770cbab
commit d6688a6754
32 files changed
+36 -36

No files matched your search

+4 -4
View File
@@ -108,7 +108,7 @@ See [internal/mock](internal/mock/README.md) for its options and behaviour.
| `internal/config` | Configuration loading, validation and editing |
| `internal/fetcher` | Runs a worker per enabled source |
| `internal/store` | SQLite storage of opportunities, and its migrations (see [internal/store](internal/store/README.md)) |
| `internal/findATender` | FTS API client and conversion from OCDS to JobSearch types |
| `internal/findatender` | FTS API client and conversion from OCDS to JobSearch types |
| `internal/types` | JobSearch's own opportunity types |
| `internal/util` | The periodic `Worker` used by the fetcher |
| `internal/logging` | slog setup and the HTTP access log |
@@ -134,7 +134,7 @@ Tests don't need network access; HTTP calls go to local `httptest` servers.
Using a source called `example` as an illustration:
1. **Configuration section:** create `internal/config/conf_source_example.go`,
copying an existing source such as `conf_source_ftsMock.go`:
copying an existing source such as `conf_source_ftsmock.go`:
- Add a `JSCKSourceExample = "example"` constant.
- Define `JobSearchConfigSourceExample`, embedding `JobSearchConfigSource`
(for `enabled` and `interval`), plus any fields of its own with `cfg` and
@@ -152,10 +152,10 @@ Using a source called `example` as an illustration:
code.
3. **Client package:** create a package that fetches from the source and
returns `[]*types.Opportunity` (see `internal/types`). If the source
publishes OCDS, `internal/findATender` may already be suitable, as it is
publishes OCDS, `internal/findatender` may already be suitable, as it is
for `fts_mock`: create it with the source's own API root.
4. **Worker:** create `internal/fetcher/worker_example.go`, following
`worker_ftsMock.go`:
`worker_ftsmock.go`:
- `runExample(ctx, conf, since)` builds a `util.Worker` with the source's
name, `conf.Sources.Example.Interval` and a task, then calls `Run`.
- The task fetches everything since its `since` argument. Wrap blocking