Files
job-search/internal/cli/fetch/command.go
T
bwilliams ac44b45f06 Split fetch from jobsearch into a separate fetcher command, and renamed fetch once to fts-once
job-search no longer has a fetch command. Its subcommands are now in
cmd/fetcher, which reads the same configuration: "fetcher service" runs
every enabled source's fetcher on its interval until stopped, and
"fetcher fts-once" (was "fetch once") fetches from Find a Tender once and
prints the releases as JSON. The new namea say what the commands do,
because service runs every source while fts-once fetches only from Find a
Tender.

The code stays in internal/cli/fetch, where NewCommands replaces the fetch
parent command. once.go is now fts_once.go and commandOnce is
commandFTSOnce. The README's usage, the config README and the find_a_tender
api_root comment now give the new command names.
2026-10-16 09:13:10 +01:00

19 lines
480 B
Go

// Package fetch holds the fetcher commands: "fts-once" fetches from Find a
// Tender once and prints the releases, and "service" polls every enabled
// source on its interval.
package fetch
import (
"github.com/spf13/cobra"
"git.avsdev.uk/Go/job-search/internal/cli"
)
// NewCommands returns the fetcher commands, "fts-once" and "service".
func NewCommands(opts *cli.Options) []*cobra.Command {
return []*cobra.Command{
commandFTSOnce(opts),
commandService(opts),
}
}