Commit Graph
13 Commits
Author SHA1 Message Date
bwilliams dcb714dc19 Some bug fixes:
- logging: LogToFile shadowed the package-level fileLogger, so
  IsFileLogger was always false and Shutdown never closed the file
- logging: replace IsJSONHandler's unsafe reflection into slog
  internals with a *slog.JSONHandler type check
- cli: fail if the log file can't be opened instead of silently
  logging to the terminal; return the log shutdown error from Finish
- build.sh: -X flags used the wrong module path, so the version, build
  time and commit were never stamped
2026-10-09 17:58:48 +01:00
bwilliams 399eccf2de Find a Tender API client updates
- Convert OCDS releases to types.Opportunity (internal/types); FetchOnce
  and FetchAll now return opportunities, built from each ocid's latest
  release
- Include each item's main classification as well as its additional ones
- Return ErrUnexpectedStatus for non-200 responses and
  ErrRateLimitExceeded for a repeated 429; close discarded bodies
- Stop fetchAll on a repeated next link and close each page's body once
  read rather than deferring in the loop
- Default a zero Since to 24 hours ago
- Merge date repair and releaseIDs into api.go
- Filter --planning/--opportunities/--awards on each procedure's current
  stage, using OCDS release tags; --opportunities previously matched a
  nonexistent "opportunity" tag and returned nothing
- Reject conflicting filters before fetching (cobra flag group)
2026-10-09 17:56:55 +01:00
bwilliams 69620e5f7d Unit tests added for internal/config 2026-10-09 17:07:50 +01:00
bwilliams 09644d0691 Moved config set/unset to internal/config/modify.go as Store and Purge. 2026-10-09 17:07:06 +01:00
bwilliams 539e88e73c removed copyright/license header from all files since it was getting tedious. It remains in the cmd main.go and there is still the LICENSE file 2026-10-09 12:27:35 +01:00
bwilliams e43b7a8370 Added fetch script for UK Gov FindATender service which is based on OCDS (with issues...) 2026-10-09 10:08:11 +01:00
bwilliams ff33ef082a Refactored configuration to make sections less code intensive to add 2026-10-09 09:30:15 +01:00
bwilliams dd26976f76 Moved package log to logging 2026-10-09 09:30:02 +01:00
bwilliams da81e6ccd9 Silence usage on commands that apply 2026-10-09 09:29:53 +01:00
bwilliams 6436253629 Refactored main.go into cmd/jobsearch/main.go (in case separate commands are introduced later) which has required the options mechanism to change slightly as well as the logging. 2026-10-09 09:29:42 +01:00
bwilliams de3ebf68c5 Added an unsafe reflect to detect if a log handler is JSON enabled or not 2026-09-29 11:55:45 +01:00
bwilliams a0fad30e99 Config to string, JSON and YAML methods added and updated print methods to use new methods 2026-09-29 11:55:11 +01:00
bwilliams e715024cbd Initial project 2026-09-23 14:32:50 +01:00