From 37deedc9b1da92571548c920721984d545269eb4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 13 May 2024 15:07:00 +0200 Subject: refactor: move Source/Repository types to config package --- internal/importer/ingest.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/importer/ingest.go') diff --git a/internal/importer/ingest.go b/internal/importer/ingest.go index 7706807..f78722a 100644 --- a/internal/importer/ingest.go +++ b/internal/importer/ingest.go @@ -7,6 +7,7 @@ import ( "net/url" "os" "reflect" + "searchix/internal/config" "searchix/internal/options" "github.com/bcicen/jstream" @@ -108,14 +109,14 @@ type OptionIngester struct { ms *mapstructure.Decoder optJSON nixOptionJSON infile *os.File - source *Source + source *config.Source } type Ingester[T options.NixOption] interface { Process() (<-chan *T, <-chan error) } -func NewOptionProcessor(inpath string, source *Source) (*OptionIngester, error) { +func NewOptionProcessor(inpath string, source *config.Source) (*OptionIngester, error) { infile, err := os.Open(inpath) if err != nil { return nil, errors.WithMessagef(err, "failed to open input file %s", inpath) -- cgit 1.4.1