Fixed lint issues and missing documentation

This commit is contained in:
bwilliams committed 2026-10-13 12:21:32 +01:00
1 parent 7fd321df97
commit 6e6dec68c0
34 files changed
+346 -156

No files matched your search

+8 -2
View File
@@ -2,6 +2,7 @@ package findATender
import (
"context"
"log/slog"
"time"
"git.avsdev.uk/Go/job-search/internal/config"
@@ -9,6 +10,8 @@ import (
resty "resty.dev/v3"
)
// FindATender is a client for the Find a Tender OCDS API (or the mock
// server). Create it with New and call Shutdown when finished with it.
type FindATender struct {
httpClient *resty.Client
config *config.JobSearchConfig
@@ -47,9 +50,12 @@ func (ft *FindATender) With(ctx context.Context) *FindATender {
return &copied
}
// Shutdown closes the client's HTTP connections.
// Shutdown closes the client's HTTP connections. A failure to close is
// logged, as there is nothing a caller could do about it.
func (ft *FindATender) Shutdown() {
ft.httpClient.Close()
if err := ft.httpClient.Close(); err != nil {
slog.Warn("findATender: closing HTTP client", "error", err)
}
}
// FetchOnce fetches the first page of releases updated since since, and